[R] round giving different results on Windows and Mac
Ruth Ripley
ruth at stats.ox.ac.uk
Fri Mar 9 22:34:14 CET 2012
Dear all,
I have been running some tests of my package RSiena on different
platforms and trying to reconcile the results.
With Mac, the commands
options(digits=4)
round(1.81652, digits=4)
print 1.817
With Windows, the same commands print 1.816
I am not bothered which answer I get, but it would be nice if they were
the same. A linux box agreed with the Mac.
Mac sessionInfo():
R version 2.14.2 (2012-02-29)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RSiena_1.0.12.205
loaded via a namespace (and not attached):
[1] grid_2.14.2 lattice_0.20-0 Matrix_1.0-4 tools_2.14.2
Windows (but 2.14.1patched was the same) sessionInfo():
R version 2.15.0 alpha (2012-03-08 r58640)
Platform: i386-pc-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_United Kingdom.1252
[2] LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
Any enlightenment would be gratefully received.
Ruth
--
Ruth M. Ripley, Email:ruth at stats.ox.ac.uk
Dept. of Statistics, http://www.stats.ox.ac.uk/~ruth/
University of Oxford, Tel: 01865 282857
1 South Parks Road, Oxford OX1 3TG, UK Fax: 01865 272595
More information about the R-help
mailing list