Learn R Programming

adana (version 1.1.0)

bin2int: Convert Binary Numbers to Integers

Description

The function bin2int converts a binary coded number to integer.

Usage

bin2int(bin)

Arguments

bin

A binary coded number.

Value

Returns the integer equivalent of the input number.

Details

The bin2int function works as a compliment of the int2bin function.

See Also

int2bin

Examples

Run this code
# NOT RUN {
x <- c(1,1,1,1,1,0,1,0,0)
bin2int(x)  # returns 500
# }

Run the code above in your browser using DataLab