Does anyone know how to use the subset.ff function in the ff package?
Here is a sample of the data:
col1 col2 col3 col4 col5 col6 col7
1 1 1 1 1 1 0
1 1 1 1 1 1 0
104 11 3 3 1 1 1089
63 11 2 3 9 1 734
11 1 3 1 1 1 -609
11 1 3 1 1 1 -609
11 1 3 1 1 1 -609
Here is the code:
temp2a <- subset.ff(temp1,temp1$col7!="0") #temp1 is the name of the ff data frame
I get the following error:
Error in `length<-.ffdf`(`*tmp*`, value = 12965531L) : not allowed to change the number of (virtual) columns of ffdf
I am trying to get two ff data frame subsets from the data. One where col7 is equal to 0 and one where col7 is not equal to zero. Does anyone know how to use the subset.ff function or another way to do what I want. I tried looking through the pdf for the ffbase library and all over the web but I couldn’t find any examples.
Cheers again,
Lorcan
what does
temp1$col7!="0"give you? Is it like?subset.ffdfstatesProbably you need to change it to
temp1$col7 != 0