do 'str(t1)' to see what the value returned is. Most likely one of the comparisons in the 'if' statement is evaluating to NA.
Also PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. 2010/7/19 A. Fırat ÖZDEMİR <firat.ozde...@deu.edu.tr>: > Hi, > > i have such a code > > tau<-0 > for (i in 1:10) > { > x<-rnorm(20,0,1) # > > t1=onesampb(x,est=tauloc,SEED=F)$conf.interval > if(t1[1]>0 ||t1[2]<0)tau=tau+1 > } > print (tau) > > this code gives me > > Error in if (t1[1] > 0 || t1[2] < 0) tau = tau + 1 : > missing value where TRUE/FALSE needed > > what can be done with such a warning message? > > i tried > > x<-x[!is.na(x)] > > but didnt work. > > Best Regards.. > > firat > > Yrd.Doç.Dr.A.Fýrat ÖZDEMÝR > DEÜ Fen Edebiyat Fakültesi > Ýstatistik Bölümü > Tel: 232-412 85 52 > Belge Geçer: 232-453 42 65 > [[alternative HTML version deleted]] > > > ______________________________________________ > 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. > > -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? ______________________________________________ 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.