[Rd] R-devel: as.character() for hexmode no longer pads with zeros

Henrik Bengtsson henr|k@bengt@@on @end|ng |rom gm@||@com
Thu Sep 23 05:48:05 CEST 2021


The update in rev 80946
(https://github.com/wch/r-source/commit/d970867722e14811e8ba6b0ba8e0f478ff482f5e)
caused as.character() on hexmode objects to no longer pads with zeros.

Before:

> x <- structure(as.integer(c(0,8,16,24,32)), class="hexmode")
> x
[1] "00" "08" "10" "18" "20"
> as.character(x)
[1] "00" "08" "10" "18" "20"

After:

> x <- structure(as.integer(c(0,8,16,24,32)), class="hexmode")
> x
[1] "00" "08" "10" "18" "20"
> as.character(x)
[1] "0"  "8"  "10" "18" "20"

Was that intended?

/Henrik

PS. This breaks R.utils::intToHex()
[https://cran.r-project.org/web/checks/check_results_R.utils.html]



More information about the R-devel mailing list