[R] Subset using partial values
Newbie19_02
nvanzuydam at gmail.com
Wed Mar 3 15:33:04 CET 2010
Hi everyone,
I would like to subset a data.frame using partial values.
For example I have the following data.frame:
PROCHI Main_condition
1234 411
1235 4110
1236 4111
1237 I20
1238 I201
1239 I202
Now let's say that I use the Subset function. Ordinarily I would use it as
follows Subset(x, Main_condition=="411"|Main_condition=="4110" etc to get
all the 411s.
Is there a way that you can subset by only using part of the term that you
wish to subset by?
Thanks,
Natalie
--
View this message in context: http://n4.nabble.com/Subset-using-partial-values-tp1576614p1576614.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list