[R] as.character on OS X tiger

Marcus Davy mdavy at hortresearch.co.nz
Fri Sep 23 04:34:11 CEST 2005

When I run this example code on a G5 the last digit is dropped off on a
binary installation of R (R.app), whereas on a linux machine the digit is
not removed.

# Code:
a <- seq(0,1, length=1000)[12]


# Results I get:
a <- seq(0,1, length=1000)[12]
> a
[1] 0.01101101
> as.character(a)
[1] "0.0110110110110110"
> as.character(as.numeric(as.character(a)))
[1] "0.011011011011011"

Can anyone enlighten me on the subtle difference between OS's, its causing
issues for me when I write to list elements with these characters strings
and some occasionally have lost the last "0".


> sessionInfo()
R version 2.1.1, 2005-06-20, powerpc-apple-darwin7.9.0

attached base packages:
[1] "methods"   "stats"     "graphics"  "grDevices" "utils"     "datasets"
[7] "base"


The contents of this e-mail are privileged and/or confidenti...{{dropped}}

More information about the R-help mailing list