[R] strange behavior in base::as.double

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Wed May 1 21:33:19 CEST 2024


On 01/05/2024 11:32 a.m., Carl Witthoft wrote:
> Hello.
> I'm running R 4.4.0 on an iMac Venture 13.5.2 .   There appears to be a bug
> in as.double().
> 
> Create a string with a numeric digits followed by a single letter a thru f
> (as tho' it's base 16).
> 
> for  K  in (a,b,c,d, and f ) ,  as.double( '123K') returns NA
> but as.double('123e') returns 123 -- or whatever the first digit is.
> 
> Please let me know if there are additional tests I can try .

This has been mentioned in the news recently.  123e was taken as 
scientific format, with an implied 0 at the end, i.e. 123e0.  That is no 
longer true after the recent fix; I'm not sure if it is in R 
4.4.0-patched yet.

Duncan Murdoch



More information about the R-help mailing list