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

Ivan Krylov |kry|ov @end|ng |rom d|@root@org
Wed May 1 21:48:44 CEST 2024


В Wed, 1 May 2024 11:32:32 -0400
Carl Witthoft <cellocgw using gmail.com> пишет:

> but as.double('123e') returns 123 -- or whatever the first digit is.

Nicely spotted problem!

Prof. Brian D. Ripley has fixed it in R-devel revision 86436 [*]. Now
as.double('123e') will also return NA. I think that the fix will become
part of R-4.4.1 when it's released.

-- 
Best regards,
Ivan

[*]
https://github.com/r-devel/r-svn/commit/9069a729f5bf69de8250a4c91dd482fcf64e1154



More information about the R-help mailing list