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
--
View this message in context:
http://r.789695.n4.nabble.com/Data-manipulation-search-tp2321927p2321927.html
Sent from the R help mailing list archive at Nabble.com.
?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