This function takes a "rawBlock"
object and
generates human-readable strings for displaying the block.
Each string contains a binary offset, the binary data
in a raw machine format, and an interpretation of
the data in a human-readable format.
# S3 method for rawBlock
as.character(x, width = NULL, machine = NULL,
sep1 = " : ", sep2 = " | ",
showOffset = TRUE, showHuman = TRUE, ...)
A "rawBlock"
object.
The number of bytes to display per string.
The machine format to display;
either "hex"
or "binary"
.
A separator to insert between the block offset and the machine format.
A separator to insert between the machine format and the human-readable format.
If FALSE
, the column of offsets is
not included in the strings.
If FALSE
, the column of human-readable format is
not included in the strings.
Other arguments to as.character
.
A character vector.
If either width
or machine
is NULL
,
the relevant value is taken from the
"rawBlock"
object. The human-readable format is
taken from the "rawBlock"
object.
# NOT RUN {
fileBlock <- readRaw(hexViewFile("rawTest.txt"), width=8)
as.character(fileBlock)
# }
Run the code above in your browser using DataLab