[R] Warning message in if else statement

Monica Pisica pisicandru at hotmail.com
Wed Jul 23 18:05:24 CEST 2008


Hi,

I am using an if else statement inside a function …. If I use that function I have no problems …. If I use the function with the if else statement inside a second function I get the following waring:

Warning message:
In if (pval == 0) p_value <- "< 2.2e-16" else p_value <- pval :
  the condition has length> 1 and only the first element will be used

Using the second function I get the expected results, with a real p-value even if it is extremely small, or "
_________________________________________________________________
[[elided Hotmail spam]]



More information about the R-help mailing list