[R] Rattle loading String to Vector file from WEKA

NightWolf nightwolfzor at gmail.com
Wed Aug 3 16:23:09 CEST 2011


Hi all,

I have been using WEKA to do some text classification work and I want to try
out R. 

The problem is I cannot load the String to Vector ARFF files created by
WEKA's string parser into Rattle . 
Looking at the logs I get something like:

/Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, 
:
   scan() expected 'a real', got '2281}'/


*My ARFF data file looks a bit like this:*

/@relation 'reviewData'

@attribute polarity {0,2}
.....
@attribute $$ numeric
@attribute we numeric
@attribute wer numeric
@attribute win numeric
@attribute work numeric

@data
{0 2,63 1,71 1,100 1,112 1,140 1,186 1,228 1}
{14 1,40 1,48 1,52 1,61 1,146 1}
{2 1,41 1,43 1,57 1,71 1,79 1,106 1,108 1,133 1,146 1,149 1,158 1,201 1}
{0 2,6 1,25 1,29 1,42 1,49 1,69 1,82 1,108 1,116 1,138 1,140 1,155 1}
..../

Any ideas how I can convert this into an R readable format?

Cheers!

--
View this message in context: http://r.789695.n4.nabble.com/R-Rattle-loading-String-to-Vector-file-from-WEKA-tp3715641p3715641.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list