Converting a hex number into a negative one in R

Viewed 29

I wanted to print a negative number using sprintf: x <- 5, sprintf("%x is a negative number", x) and the result is the following one: "fffffffb is a negative number". Then I tried to use separately strtoi() to convert the hex value: strtoi("0xfffffffb", base=32L) and the result was: [1] NA.

0 Answers
Related