bcdToInteger: Decode BCD to integer

Description Usage Arguments Value Author(s) Examples

Description

Decode BCD to integer

Usage

1
bcdToInteger(x, endian = c("little", "big"))

Arguments

x

a raw value, or vector of raw values, coded in binary-coded decimal.

endian

character string indicating the endian-ness ("big" or "little"). The PC/intel convention is to use "little", and so most data files are in that format.

Value

An integer, or list of integers.

Author(s)

Dan Kelley

Examples

1
2
3
library(oce)
twenty.five <- bcdToInteger(as.raw(0x25))
thirty.seven <- as.integer(as.raw(0x25))

Example output

Loading required package: testthat
Loading required package: gsw

oce documentation built on March 28, 2021, 9:09 a.m.