[R] as.character on OS X tiger

From: Marcus Davy <mdavy_at_hortresearch.co.nz>
Date: Fri 23 Sep 2005 - 12:34:11 EST

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}}

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Sep 23 12:40:59 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:25 EST