[R] how to test if a vector contain a value?
Grzesiek
gregorio99 at gmail.com
Mon Aug 16 15:17:02 CEST 2010
You have a lot of different way
a<-c(1,2,3,NA,3,4,3)
is.na(a)
[1] FALSE FALSE FALSE TRUE FALSE FALSE FALSE
a==2
[1] FALSE TRUE FALSE NA FALSE FALSE FALSE
Look at here:
http://cran.r-project.org/doc/manuals/R-intro.html
--
View this message in context: http://r.789695.n4.nabble.com/how-to-test-if-a-vector-contain-a-value-tp2326843p2326868.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list