bin2dec_vec: convert binary codes to decimal integers

Description Usage Arguments Value Examples

View source: R/utils.R

Description

convert binary codes to decimal integers

Usage

1
bin2dec_vec(mat, LOG = TRUE)

Arguments

mat

A binary matrix the rows of which are the binary codes to be converted.

LOG

Take the logarithm of the decimal integer (default is TRUE); otherwise, set to FALSE.

Value

A vector of numbers after conversion

Examples

1
2
bin2dec_vec(rbind(c(1,0,0),c(1,1,0),c(0,0,1),c(1,0,1),c(0,0,0)))
bin2dec_vec(rbind(c(1,0,0),c(1,1,0),c(0,0,1),c(1,0,1),c(0,0,0)),LOG=FALSE)

oslerinhealth/rewind documentation built on May 26, 2019, 9:36 a.m.