[R] Strange warning in summary.lm

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Jul 25 12:20:11 CEST 2007


On Wed, 25 Jul 2007, ONKELINX, Thierry wrote:

> Dear Peter, Uwe and Brian,
>
> I've found some more problems with options(OutDec = ",").
>
> 1) as.numeric yields NA where it shouldn't

It should: where does it say otherwise?  OutDec affects output, only.

>
>> z <- c("12", "12,34", "12.34")
>> options(OutDec = ",")
>> as.numeric(z)
> [1] 12,00    NA 12,34
> Warning message:
> NAs introduced by coercion in: as.double.default(z)
>
> # should result in c(12, 12.34, NA)
>
>> options(OutDec = ".")
>> as.numeric(z)
> [1] 12.00    NA 12.34
> Warning message:
> NAs introduced by coercion in: as.double.default(z)
>
>
> 2) anova yields the same warning as summary

It does not in current R: try any fairly recent version of R-devel.

Please don't keep reporting a problem we have already fixed, as the FAQ 
and the posting guide explicitly ask of you.

[...]


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list