decode4int {adana}R Documentation

Convert binary vectors to integer vectors

Description

The function decode4int converts each element in a given binary vector to a integer number.

Usage

decode4int(x, M, ...)

Arguments

x

A vector containing binary numbers

M

A vector containing the number of bits of each binary in the x.

...

Further arguments passed to or from other methods.

Details

This function converts each element in the binary vector passed with the x argument to an integer. The M argument refers to the number of bits of each binary in the x vector.

Value

A vector of integer for input binary vector

Author(s)

Zeynel Cebeci & Erkut Tekeli

See Also

encode4int

Examples

binmat = c(0,0,1,1,1,0,0,1,0,0,1,0)
M = c(4,4,4)
intmat = decode4int(binmat, M=M)
intmat

[Package adana version 1.1.0 Index]