Skip to content
Prev 67222 / 398502 Next

hex format

Steve Vejcik wrote:
R doesn't use decimal or hex values internally, it stores values in the 
native format (which is 64 bit floating point or 32 bit binary integers 
on most platforms).

You're talking about string conversions on input and output, which is a 
different issue.  R doesn't support C-style hex notation on input 
(though you can use "as.numeric" on input, as Brian said).

If you want an integer vector to always display in hex, assign a class 
to it and define a print method.  I don't think there's a standard 
library function to display in hex, but there are probably packages to 
do so.

Duncan Murdoch