I am trying to convert a string to  a double using "as.numeric"
However, R is truncating the results!

Options(digits) is set to 7.

Can anyone shed some light on this?
Thanks!


> b[1]
[1] "116.28125"

> summary(b[1])
   Length     Class      Mode 
        1 character character 

> c <- as.numeric(b[1])
> c
[1] 116.2812



-- 
View this message in context: 
http://n4.nabble.com/as-numeric-is-truncating-tp990546p990546.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to