Glen Jones <[EMAIL PROTECTED]> wrote: > if (InternalMean == 0) > Intresult = 1 > if (InternalMean > 0 & InternalMean < 1) > Intresult = .95 > [etc.]
This looks like a job for "cut": R> i <- cut(InternalMean, c(-Inf,0,1,2,4,9,Inf), labels=F) R> Intresult <- c(1,.95,.85,.70,.50,0)[i] -- David Brahm ([EMAIL PROTECTED]) ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
