Displaying 1 result from an estimated 1 matches for "intresult".
2005 May 12
4
Multiple IF statements - is there a better alternative?
Hello,
Rather than rely on a set of IF statements (as there could be many -
please see below)), could the following be done in a different/better
way?
InternalMean <- mean(data1[,3])
if (InternalMean == 0)
Intresult = 1
if (InternalMean > 0 & InternalMean < 1)
Intresult = .95
if (InternalMean >= 1 & InternalMean < 2)
Intresult = .85
if (InternalMean >= 2 & InternalMean < 4)
Intresult = .70
...
if (InternalMean >= 9)
Intresult = .0
Thanks in advance
Glen Jones...