numToRaw {pack} | R Documentation |
Convert numeric values to a raw vector.
numToRaw(x, nBytes = 1)
x |
A number to be converted |
nBytes |
The number of bytes to use |
A raw vector containing the bytes representing x
.
Josh Ulrich
# Will be left null padded (x <- numToRaw(421,4)) rawToNum(x,2) rawToNum(x,4)