loadbin: Read binary data into array

Description Usage Arguments Value Author(s)

View source: R/loadbin.R

Description

Reads binary data using the base function readBin and recasts it into an array of custom dimensions.

Usage

1
2
3
4
5
6
7
8
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


docore documentation built on Feb. 1, 2022, 5:06 p.m.

Related to loadbin in docore...