Romain Lorrilliere wrote:
Hi,
do you know, a method to convert an decimal value (integer) to the
corresponding hexadecimal value ?
thinks for help.
Romain
The fBasics package has two hidden functions:
.dec.to.hex(145678)
[1] 02390E
.hex.to.dec(02390E)
[1] 145678
DW
**
Romain Lorrilliere wrote:
Hi,
do you know, a method to convert an decimal value (integer) to the
corresponding hexadecimal value ?
thinks for help.
Romain
You mean representation, not value; the value doesn't change. One
method is sprintf with the %x formatting code.
-Dan
--
Dan
Hi,
do you know, a method to convert an decimal value (integer) to the
corresponding hexadecimal value ?
thinks for help.
Romain
--
Lorrillière Romain
UMR 8079 Laboratoire Ecologie, Systématique et Evolution
Bât. 362
Université Paris-Sud
91405 Orsay cedex
France
tel : 01 69 15
Try:
sprintf(%x, 109)
On 9/30/06, Romain Lorrilliere [EMAIL PROTECTED] wrote:
Hi,
do you know, a method to convert an decimal value (integer) to the
corresponding hexadecimal value ?
thinks for help.
Romain
--
Lorrillière Romain
UMR 8079 Laboratoire Ecologie, Systématique et
use sprintf
sprintf(%x,123)
[1] 7b
On 9/30/06, Romain Lorrilliere [EMAIL PROTECTED] wrote:
Hi,
do you know, a method to convert an decimal value (integer) to the
corresponding hexadecimal value ?
thinks for help.
Romain
--
Lorrillière Romain
UMR 8079 Laboratoire Ecologie,
?sprintf
ex :
sprintf('%X',10)
[1] A
hih
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal,
how about learning to use help.search? (In may you already asked a
similiar question...)
help.search(hexadecimal)
which would lead you to format.hexmode
?format.hexmode
Romain Lorrilliere schrieb:
Hi,
do you know, a method to convert an decimal value (integer) to the
corresponding
An other way would be:
a - 123
class(a) - hexmode
a
[1] 7b
On 30 Aug 2006, at 16:26, mel wrote:
?sprintf
ex :
sprintf('%X',10)
[1] A
hih
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
Romain Lorrilliere [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi,
do you know, a method to convert an decimal value (integer) to the
corresponding hexadecimal value ?
Starting in R 2.1.0, sprintf can be used:
x - c(0, 65535, 65536, 305419896, 2^31-1)
y - sprintf(0x%X, x)
y