Learn R Programming

TRSbook (version 1.0.4)

dec2bin: Binary representation of a decimal number

Description

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

Usage

dec2bin(x,prec=52)

Value

Binary representation of the number x

Arguments

x

Numeric. Number in a decimal format.

prec

Integer. Precision desired.

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
dec2bin(10.625,3)

Run the code above in your browser using DataLab