Learn R Programming

TRSbook (version 1.0.2)

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)

Arguments

x

Numeric. Number in a decimal format.

prec

Integer. Precision desired.

Value

Binary 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 {
dec2bin(10.625,3)
# }

Run the code above in your browser using DataLab