Re: [R] Select a set of rows based on a condition

2011-12-07 Thread RaoulD
Thanks a million Michael! Works perfectly! Really appreciate it! -- View this message in context: http://r.789695.n4.nabble.com/Select-a-set-of-rows-based-on-a-condition-tp4168594p4171746.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Select a set of rows based on a condition

2011-12-07 Thread R. Michael Weylandt
If you know the index letters are unique. df <- data.frame(indx = LETTERS[1:7], levels = sample(7)) ind1 <- which(df$indx == "A") ind2 <- which(df$indx == "B") df[ind1:ind2, ] Michael On Wed, Dec 7, 2011 at 6:23 AM, RaoulD wrote: > Hi, > > I need help with selecting a set of rows from a colum