[R] as.numeric

Uwe Ligges ligges at statistik.uni-dortmund.de
Wed Jul 24 14:55:49 CEST 2002

Mike Lonergan wrote:
> Why is as.numeric("3/2") NA plus a warning?

Because "3/2" is a character string that cannot be coerced to numeric
You mean: You want to evaluate the expression(!) 3/2, which is - whyever
- inquotation marks.

Maybe the following line is more appropriate to you problem?

Uwe Ligges
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list