Re: [R] as.numeric(".") returns 0

From: Peter Dalgaard <P.Dalgaard_at_biostat.ku.dk>
Date: Thu, 12 Jun 2008 13:43:58 +0200

Paul Johnson wrote:
> In R version 2.7.0 (2008-04-22) as.numeric(".") returns zero.
>
>
>> as.numeric(".")
>>
> [1] 0
>
> This must be a bug. Splus and previous versions of R (<= 2.6.0) return NA,
> as you might expect.
>
> I'm running R version 2.7.0 (2008-04-22) on Windows XP.
>
>

I suspect that this got fixed along with the "lone sign" issue. I have

R version 2.7.0 Patched (2008-06-12 r45900) Copyright (C) 2008 The R Foundation for Statistical Computing

> as.numeric(".")

[1] NA
Warning message:
NAs introduced by coercion

-- 
   O__  ---- Peter Dalgaard             Ă˜ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard_at_biostat.ku.dk)              FAX: (+45) 35327907

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 12 Jun 2008 - 12:20:27 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 12 Jun 2008 - 15:00:45 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive