Displaying 1 result from an estimated 1 matches for "npt01".
Did you mean:
nspt01
2010 Jul 20
3
simplify if statement in R ?
...ut it is very long. I'm
attempting to check the value of of two different variables to see if
they evaluate to either of two different values, which will result in a
division by 0 in the final equation. This first if statement works for me
_______
if ((x0.trial01 == 0.0)||(x0.trial01 == npt01)||(x1.trial01 ==
0.0)||(x1.trial01 == npt01))
{
x0.trial01.in <- x0.trial01 + 0.5
x1.trial01.in <- x1.trial01 + 0.5
npt01.in <- npt01 + 1.0
}
else
{
x0.trial01.in <- x0.trial01
x1.trial...