?match, look at the %in% operator.
Mestat wrote:
Hi listers,
I made some search, but i didn`t find in the forum.
I have a data set.
I would like to make a search (conditon) on my data set.
x<-c(1,2,3,4,5,6,7,8,9,10)
count<-0
if (CONDITON){count<-1}else{count<-0}
My CONDITION would be: is there number 5 in my data set?
Thanks in advance,
Marcio
______________________________________________
R-help@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.