Centar 15 Centar 15 - 1 year ago 108
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.

Answer Source

You can try,

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

which would give

#[1] 1 2

#[1] 4 5
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download