[R] try question

Edna Bell edna.bell01 at gmail.com
Tue Jul 29 18:55:36 CEST 2008


Hi still yet again!

I have the following code:

> try(log(rnorm(25)),silent=TRUE)
 [1] -0.26396185         NaN         NaN -0.13078069 -2.44997193
-2.15603971         NaN  0.94917495  0.07244544         NaN
[11] -1.06341127 -0.42293099 -0.53769569  0.95134763  0.93403340
  NaN -0.10502078         NaN  0.30283262         NaN
[21] -0.11696872 -3.84122332         NaN         NaN -0.12808690
Warning message:
In log(rnorm(25)) : NaNs produced
>

I thought that putting the "silent = TRUE" would suppress the
warnings, please.  What should I do instead, please?

Thanks,
Edna Bell



More information about the R-help mailing list