I want to read a dataset, from UCI with Amazon reviews, using R.
The dataset comes in the format ARFF (.arff).
I am using the following script:
require("foreign")
setwd("H:/DataSet/amazon")
reviews <- read.arff("amazon.arff")
And I am getting the following error
Error in read.arff("amazon.arff") : Invalid attribute specification.
Thank you for your help in advanced.
I assume you mean the "Amazon Commerce reviews set Data Set" at the UCI Machine Learning Repository. Even Weka cannot open this dataset, saying
"...not recognized as an 'Arff data files' file. ... Attribute names are not unique."
and if you look into the file you see lots of entries similar to
@attribute '\'\'\'\'\'\'\'\'\'\'r\'\'\'\'\'\'\'\'\'\'\'' numeric
So something went wrong with the file, it's not the fault of R or any 'Arff' reading routines. You should ask the dataset creator whose name and e-mail address is provided on the description page.