[R] subset dataframe based on rows
Lei Jiang
lj22 at u.washington.edu
Thu Jan 23 23:49:03 CET 2003
I want to subset the dataframe based on certain values in a row.
for each row in my dataframe
if ANY one value of a particular set of columns satisfies cond
append a logical value true at the end of the row
else
append a false at the end of the row
in the end I want to be able to subset the whole data based on the
appended true or false value.
I could literally code like this, but I think there must be a better way
to do this. Can someone give me a hint?? thanks.
Lei
Department of Chemsitry
University of Washington
Box 351700
Seattle, WA 98195
Phone: 206-616-6882
Fax: 206-685-8665
More information about the R-help
mailing list