Learn R Programming

TRSbook (version 1.0.4)

bin2dec: Decimal representation of a binary number

Description

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

Usage

bin2dec(x)

Value

Decimal representation of the number x

Arguments

x

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

Author

Lafaye de Micheaux Pierre <lafaye@unsw.edu.au>, Remy Drouilhet <Remy.Drouilhet@upmf-grenoble.fr>, Liquet Benoit <b.liquet@uq.edu.au>

References

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

Examples

Run this code
bin2dec(1010.101)

Run the code above in your browser using DataLab