I want to convert for example the number 167009345.8
to 167009345.8
.
I have used lots of ways but I have problems.
For example,
x <- "167009345.8"
class(x) <- "numeric"`
the output is 167009346
.
But I want the decimal number 167009345.8
.
I have used also as.numeric
, but I have the same problem.
Could you please help me?
options(digits=10)
x<-"167009345.8"
as.numeric(x)
[1] 167009345.8
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With