[R] extract a row
Randy Zelick
zelickr at pdx.edu
Mon Aug 16 19:48:36 CEST 2004
Hello there,
Using 1.9.0 on WinXP...
I have a data frame, one column of which is named "rate". The column has
text entries like "fast", "medium", "slow", "very slow", and so forth. I
have not tried to make them factors, but maybe R did this automatically.
Anyway, I would like to display on the console rows that meet a rate
criterion.
So I want to type something like:
dataframe[rate=="slow"]
and get back this sort of output:
test subject trial rate score
34 B27 3 slow 27
55 B55 4 slow 34
where test, subject, trial, rate, and score are all the
dataframe's columns.
How do I do that??
Thanks,
=Randy=
R. Zelick email: zelickr at pdx.edu
Department of Biology voice: 503-725-3086
Portland State University fax: 503-725-3888
mailing:
P.O. Box 751
Portland, OR 97207
shipping:
1719 SW 10th Ave, Room 246
Portland, OR 97201
More information about the R-help
mailing list