switchEndianess: Switch Endianess.

View source: R/binary.R

switchEndianessR Documentation

Switch Endianess.

Description

Switch little-endian to big-endian and vice versa.

Usage

switchEndianess(x, stickyBits=FALSE)

Arguments

x

binary number. Any binary number.

stickyBits

Bits wont change if set TRUE. Only the attribute will be switched.

Value

switch little-endian to big-endian and vice versa.

See Also

fillUpToByte.

Examples

x <- as.binary(c(1,1,0,0), logic=TRUE); print(x); summary(x);
y <- rdiversity:::switchEndianess(x); print(y); summary(y);
y <- rdiversity:::switchEndianess(x, stickyBits=TRUE); print(y); summary(y);

boydorr/rdiversity documentation built on May 6, 2022, 10:56 a.m.