Message-ID: <BANLkTimBX83SCs=9=jm677S7t1dBQ6H1Xg@mail.gmail.com>
Date: 2011-04-25T21:28:00Z
From: Ivan
Subject: split data frame by factor
Dear Community,
I have a dataframe like this one:
A B
5 1
6 1
7 1
8 1
9 2
10 2
11 2
12 2
I have a problem splitting up the above data frame in respect to the
factor represented by B, whereas the resulting vector should contain
the numeric values only. I tried split() but it produces this:
A B
[1]
5 1
6 1
7 1
8 1
[2]
9 2
10 2
11 2
12 2
I want to achieve this,though:
A
[1]
5
6
7
8
[2]
9
10
11
12
How is this done? Thank you very much in advance.
Best Regards.