Learn R Programming

oce (version 1.8-3)

bcdToInteger: Convert a BCD Value to an Integer Value

Description

Convert a BCD Value to an Integer Value

Usage

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

Value

An integer, or list of integers.

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.

Author

Dan Kelley

Examples

Run this code
library(oce)
twenty.five <- bcdToInteger(as.raw(0x25))
thirty.seven <- as.integer(as.raw(0x25))

Run the code above in your browser using DataLab