[R] filter data.frame with a vector
Pascal Oettli
kridox at ymail.com
Wed Nov 28 12:14:10 CET 2012
Hello,
?is.element
Regards,
Pascal
Le 28/11/2012 18:12, Mat a écrit :
> Hello together,
>
> i have a data.frame, which i want to filter with numbers in a vector.
> I have a vector (Top10) with these numbers:
> [1] 205 302 156 378 235 328 183 375 296 374
> and i have a data.frame with a Column (CU_NO) with all my Customer numbers.
>
> How can i filter this data.frame, with the Numbers in my vector.
>
> this one doens't work:
> data_export_final<-data_export[(data_export$KD_NR==Top10),]
>
> Thank you.
>
> Mat
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/filter-data-frame-with-a-vector-tp4651098.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list