[R] extract a row
kbartz at loyaltymatrix.com
Tue Aug 17 00:26:56 CEST 2004
The easiest way to do that is
subset(dataframe, rate == "slow").
Please let me know if you have any more questions.
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Randy Zelick
Sent: Monday, August 16, 2004 10:49 AM
To: R list server posting
Subject: [R] extract a row
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
So I want to type something like:
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
How do I do that??
R. Zelick email: zelickr at pdx.edu
Department of Biology voice: 503-725-3086
Portland State University fax: 503-725-3888
P.O. Box 751
Portland, OR 97207
1719 SW 10th Ave, Room 246
Portland, OR 97201
R-help at stat.math.ethz.ch mailing list
PLEASE do read the posting guide!
More information about the R-help