Generate Class Raw Objects from Strings

USAGE:

rawFromHex(data)
rawFromAscii(data)

ARGUMENTS:

data
character string data from which raw bytes are to be interpreted.

VALUE:

an object of class raw containing all the bytes encoded in data. The strings are interpreted as hex or ascii characters for rawFromHex and rawFromAscii. All the character strings are concatenated, with terminating null bytes omitted, and the result packed into the corresponding number of bytes of raw data.

DETAILS:

The function rawData is the most elementary constructor, but rawFromHex is likely better. The function readRaw reads binary data into any suitable object; it can be used for creating raw objects, as well as for numeric vectors.

SEE ALSO:

, .

EXAMPLES:

rawFromAscii(letters[1:6]) 
rawData(6, c("61626364", "65660000")) 
rawFromHex(rep("3af", 4)) 
rawData(6, c("3af3af3a", "f3af0000"))