Learn R Programming

TRSbook (version 1.0.2)

bin2dec: Decimal representation of a binary number

Description

To compute the decimal representation of a number written in a binary format

Usage

bin2dec(x)

Arguments

x

Numeric. Number in binary format written only with 0s and 1s. See Example below.

Value

Decimal representation of the number x

References

Chapter 5 (Data Manipulation, Functions) from the book: The R Software, Fundamentals of Programming and Statistical Analysis

Examples

Run this code
# NOT RUN {
bin2dec(1010.101)
# }

Run the code above in your browser using DataLab