loadbin {cooltools} | R Documentation |
Read binary data into array
Description
Reads binary data using the base function readBin
and recasts it into an array of custom dimensions.
Usage
loadbin(
filename,
dim,
bytes = 4,
type = "numeric",
signed = FALSE,
endian = "little"
)
Arguments
filename |
path of the file to be loaded |
dim |
vector specifying the dimensions of the array |
bytes |
number of bytes per number in the binary file |
type |
character vector of length describing the data type: "numeric" (default), "double", "integer", "int", "logical", "complex", "character", "raw" |
signed |
logical. Only used for integers of sizes 1 and 2, when it determines if the quantity on file should be regarded as a signed or unsigned integer. |
endian |
endian-type ("big" or "little") of the file |
Value
Returns an array of dimension dim.
Author(s)
Danail Obreschkow
[Package cooltools version 2.4 Index]