Re: [R] Select subset of data

2011-03-29 Thread Lisa
Thank you for your kind help. Your R code works very well. -- View this message in context: http://r.789695.n4.nabble.com/Select-subset-of-data-tp3416012p3416307.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mail

Re: [R] Select subset of data

2011-03-29 Thread David Winsemius
On Mar 29, 2011, at 3:40 PM, Lisa wrote: Dear All, I have a dataset that looks like this: group subject result v4 v5 1 1 1 0 1 0 2 1 2 1 0 0 3 1 3 0 0 0 4 1 4 1 0 0 5 2 1 0 1 1 6 2 2 0

Re: [R] Select subset of data

2011-03-29 Thread Phil Spector
Lisa - Suppose your data frame is called "somedat". Then do.call(rbind,spl[sapply(spl,function(z)z$result[1] == 0 & z$result[2] == 0 & sum(z$result) == 1)]) should give you what you want. - Phil Spector Sta

Re: [R] select subset of data according to date range

2010-05-01 Thread Jim Lemon
On 05/01/2010 02:55 PM, Carol Gao wrote: Dear R lists, ... Would anyone help me with setting data frames according to the date? ... my data looks like above, but definitely with more rows. Now I want a data frame with only "2008-12-02" in the first part of the 8th variable---Time. Hi Carol, I w