[R] two questions for R beginners

Karl Ove Hufthammer karl at huftis.org
Mon Mar 1 16:38:31 CET 2010


On Mon, 01 Mar 2010 14:50:57 -0000 (GMT) Ted.Harding at manchester.ac.uk 
<Ted.Harding at manchester.ac.uk> wrote:
>   as.character(pi)
>   # [1] "3.14159265358979"
> 
> That raises a few questions about "expectations" too!

Expectations can indeed be dangerous. I have been bitten by this one:

as.numeric(as.character(pi))

It works fine in the US, but not in Europe. :)

Hint: Try options(OutDec=",")

-- 
Karl Ove Hufthammer



More information about the R-help mailing list