[Rd] as.hexmode(big number) fails in R-3.1.2

William Dunlap wdunlap at tibco.com
Fri Jan 9 23:50:32 CET 2015


There was recently a discussion here on how to tell if a number was
integral.
Did that prod someone into change as.hexmode in R-3.1.2 so that it aborts if
given a number to big to fit into a 32-bit integer?  It returned NA, with
two warnings
in R-3.1.1.

% R-3.1.2 --quiet --vanilla
> as.hexmode(c(10^c(0,9,18)))
Error in if (is.double(x) && all(is.na(x) | x == as.integer(x))) x <-
as.integer(x) :
  missing value where TRUE/FALSE needed
In addition: Warning message:
In as.hexmode(c(10^c(0, 9, 18))) : NAs introduced by coercion
> q()

% R-3.1.1 --quiet --vanilla
> as.hexmode(c(10^c(0,9,18)))
[1] "00000001" "3b9aca00" NA
Warning messages:
1: In as.hexmode(c(10^c(0, 9, 18))) : NAs introduced by coercion
2: In as.hexmode(c(10^c(0, 9, 18))) : NAs introduced by coercion

Bill Dunlap
TIBCO Software
wdunlap tibco.com

	[[alternative HTML version deleted]]



More information about the R-devel mailing list