[R] filter a data.frame

Mat matthias.weber at fnt.de
Fri Dec 13 13:59:42 CET 2013


hello together, i want to filter a data.frame. My problem is, that i want to
filter 2 numbers.

My data.frame look like this one.

No.   text
1      abc
2      def
3      ee
4      ff
5      gg

I want now to filter No. 2 and 3, so my solution should be look like this
one.

No.   text
2     def
3     ee

i tried it like this one:
out1<-out[(out$No==no.ind),]

in no.ind i have the 2 numbers: c("2","3")

but this doesn't work.

Maybe anyone can help me.

Thank you.

Mat



--
View this message in context: http://r.789695.n4.nabble.com/filter-a-data-frame-tp4682118.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list