Skip to content
Prev 5565 / 398513 Next

extracting a sub data frame by value of one of its columns

On Sun, 7 May 2000, Faheem Mitha wrote:

            
Nothing to do with sorting as far as I can see. Try

df2 <- df1[df1$c == 1,]

and note that indexing is pretty central to using S (the language), so it
is worth learning all the ways to use it.