Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

displayRawData

Display raw data in a comprehensive way


Description

Cat raw data to the sink in columns with ASCII code

Usage

displayRawData(x, ncol = 4, col.wid = 4, address.len = 3, hex.upper = T)

Arguments

x

A vector of class raw to be displayed.

ncol

Number of columns of hexadecimal code to display.

col.wid

Width of each column (in bytes) to display.

address.len

Length of the hexadecimal address (in number of hexadecimal digits) to display.

hex.upper

logical value, to specify whether hexadecimals should be displayed in uppercase (TRUE, default) or lowercase (FALSE).

Details

As binary data is hard to decipher this function will cat raw data as hexadecimal code in columns, together with the relative (hexadecimal) address of the data and an ASCII translation of the data. Hexadecimals are shown in space separated columns for improved readability. Special characters are replaced by dots in the ASCII representation.

Raw data is padded with zeros at the end to fill remaining columns...

Value

The character string send to the sink is also returned by the function.

Author(s)

Pepijn de Vries

See Also

Examples

## Display some raw random data:
displayRawData(as.raw(sample.int(100)))

## Display the full ASCII table:
displayRawData(as.raw(0:255))

adfExplorer

Import from and Export to Amiga Disk Files

v0.1.4
GPL-3
Authors
Pepijn de Vries [aut, cre, dtc]
Initial release
2018-03-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.