Centar 15 Centar 15 - 1 month ago 4x
R Question

splitting ff_vectors in r

Is there a way to perform a basic split of ff_vectors without any sums or such things? I have a ffdf called res2 consisting of 2 ff_vectors, and I want the following, from a ffdf like this:

a 1
a 2
b 4
b 5

result should be a list like with the use of split function:

1 2

4 5

I want to create transactions out of these stuff and perform analysis on them, but I require to organize my data correctly first.


You can try,

split(df[, 'B'], df[,'A'])

which would give

#[1] 1 2

#[1] 4 5