[R] converting string to float
lutz.thieme@amd.com
lutz.thieme at amd.com
Mon Feb 4 14:09:59 CET 2002
Hello everybody,
I have following string type and try to convert it to float:
> a<-"20020104.123456"
> str(as.numeric(a))
num 20020104
> str(as.real(a))
num 20020104
> str(as.double(a))
num 20020104
How can I get an float instead of an integer? How can I set the desired precision?
Thanks in advance
Lutz Thieme
Lutz Thieme
AMD Saxony Manfacturing GmbH
Product Engineering
phone: +49 351 277-4269
fax: +49 351 277-9-4269
email: lutz.thieme at amd.com
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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