hexToBits: Convert Hexadecimal Digit to Integer Vector

Description Usage Arguments Value Author(s) Examples

View source: R/misc.R

Description

hexToBits converts a string holding hexadecimal digits to a sequence of integers 0 or 1, for the bits. This is mainly for for use within showQCTests().

Usage

1
hexToBits(hex)

Arguments

hex

a vector of character values corresponding to a sequence of one or more hexadecimal digits (i.e. "0" through "9","a" through "f", or "A" through "F").

Value

An integer vector holding the bits as values 0 or 1. The inverse of 'mathematical' order is used, as is the case for the base R function rawToBits(); see the “Examples”.

Author(s)

Jaimie Harbin and Dan Kelley

Examples

1
2
3
library(argoFloats)
hexToBits('3')    # 1 1 0 0
hexToBits('4000') # 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0

dankelley/argoFloats documentation built on Oct. 19, 2021, 1:17 p.m.