R: Convert from string to double
I am trying to convert from string to double in R. However, every time I convert a number, R creates an integer.
For example:
a = "100.11"
a = as.double(a)
And the output is outputting 100
. How to preserve decimal places when converting from string to numeric? I installed options(digits=3)
.
thank
Mike
+3
source to share