R: Converting from string to double -
R: Converting from string to double -
i trying convert string double in r. however, every time convert number, r creates integer.
for example:
a = "100.11" = as.double(a)
and output reads 100
. how retain decimals when converting string numeric? i've set options(digits=3)
.
thanks
mike
the problem alternative have set:
options(digits=3) as.double("100.11") #[1] 100 options(digits=5) as.double("100.11") #[1] 100.11
digits
"controls number of digits print when printing numeric values". set alternative 3 , shown 3 digits.
r string double
Comments
Post a Comment