I have a dataframe with a column, say x consisting of values, each
value appearing different times, e.g.
x: 1,1,1,1,2,2,4,4,4,9,10,10,10,10,10 ...
and a vector, including e.g.:
y: 2,9,10,...
I need a subset of the dataframe: all rows where x is equal to one of
the values in y. Currently I use a
On 2/8/2006 9:21 AM, Bernhard Baumgartner wrote:
I have a dataframe with a column, say x consisting of values, each
value appearing different times, e.g.
x: 1,1,1,1,2,2,4,4,4,9,10,10,10,10,10 ...
and a vector, including e.g.:
y: 2,9,10,...
I need a subset of the dataframe: all rows where x
Bernhard Baumgartner wrote:
I have a dataframe with a column, say x consisting of values, each
value appearing different times, e.g.
x: 1,1,1,1,2,2,4,4,4,9,10,10,10,10,10 ...
and a vector, including e.g.:
y: 2,9,10,...
I need a subset of the dataframe: all rows where x is equal to one of
PROTECTED] conto di Bernhard
Baumgartner
Inviato: 08 February 2006 15:22
A: r-help@stat.math.ethz.ch
Oggetto: [R] dataframe subset
I have a dataframe with a column, say x consisting of
values, each
value appearing different times, e.g.
x
Sounds like you may need no use match().
On Wed, 2006-02-08 at 15:21 +0100, Bernhard Baumgartner wrote:
I have a dataframe with a column, say x consisting of values, each
value appearing different times, e.g.
x: 1,1,1,1,2,2,4,4,4,9,10,10,10,10,10 ...
and a vector, including e.g.:
y:
@stat.math.ethz.ch
Date sent: Wed, 08 Feb 2006 15:21:46 +0100
Priority: normal
Subject:[R] dataframe subset
I have a dataframe with a column, say x consisting of values, each
value appearing different times, e.g. x:
1,1,1,1,2,2,4,4,4,9,10,10,10,10,10
Thanks to all,
the %in% function solved my problem!
Bernhard
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
]
[mailto:[EMAIL PROTECTED] On Behalf Of
Bernhard Baumgartner
Sent: Wednesday, February 08, 2006 9:22 AM
To: r-help@stat.math.ethz.ch
Subject: [R] dataframe subset
I have a dataframe with a column, say x consisting of values, each
value appearing different times, e.g.
x