[Rd] Flag '#' in sprintf() format string "%#x"?

From: Henrik Bengtsson <hb_at_stat.berkeley.edu>
Date: Sat, 20 Jun 2009 15:44:24 -0700

Hi, this is a bit of FYI, but also a question.

Is flag '#' in sprintf() format string "%#x" fully supported across platforms? Can that be assumed? I discovered thanks to the r-forge service, that this was not the case for OSX with "R version 2.9.0 Under development (unstable) (2009-01-13 r47593)", where R CMD check reports the following:

Error in sprintf("%#x", values) :
  use format %d, %i, %x or %X for integer objects

where values <- as.integer(1:5). Note it works well on other platforms; I don't know about newer R version on OSX. Should I consider this a glitch in an old version of R (newer R version do a much better validation here), or should I simply avoid '#'?



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat 20 Jun 2009 - 22:49:42 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 Sun 21 Jun 2009 - 00:30:54 GMT.

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

list of date sections of archive