[R] match() question or needle haystack problem for a data.frame

Knut Krueger rhe|p @end|ng |rom krueger-|@m||y@de
Mon Oct 22 17:18:35 CEST 2018


Am 22.10.18 um 17:01 schrieb Eric Berger:
> v <- match(Mydata$DATA1, needles, nomatch=NA)
>  > found <- Mydata[ !is.na <http://is.na>(v), ]
>  > missing <- Mdata[ is.na <http://is.na>(v), ]

Thank you it is working, additionally as Bert suggested, it seems that

Mydata[Mydata$DATA1 %in% needles,]

is doing the same.

Kind Regards Knut




More information about the R-help mailing list