dec2bin: Binary representation of a decimal number

Description Usage Arguments Value Author(s) References Examples

View source: R/binaries.func.R

Description

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

Usage

1
dec2bin(x,prec=52)

Arguments

x

Numeric. Number in a decimal format.

prec

Integer. Precision desired.

Value

Binary representation of the number x

Author(s)

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

1
dec2bin(10.625,3)

Example output

Loading required package: xtable
Loading required package: RColorBrewer
Loading required package: gdata
sh: 1: cannot create /dev/null: Permission denied
gdata: Unable to locate valid perl interpreter
gdata: 
gdata: read.xls() will be unable to read Excel XLS and XLSX files
gdata: unless the 'perl=' argument is used to specify the location of a
gdata: valid perl intrpreter.
gdata: 
gdata: (To avoid display of this message in the future, please ensure
gdata: perl is installed and available on the executable search path.)
sh: 1: cannot create /dev/null: Permission denied
gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLX' (Excel 97-2004) files.

gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLSX' (Excel 2007+) files.

gdata: Run the function 'installXLSXsupport()'
gdata: to automatically download and install the perl
gdata: libaries needed to support Excel XLS and XLSX formats.

Attaching package: 'gdata'

The following object is masked from 'package:stats':

    nobs

The following object is masked from 'package:utils':

    object.size

The following object is masked from 'package:base':

    startsWith

Loading required package: IndependenceTests
[1] "1010.101"

TRSbook documentation built on May 2, 2019, 2:45 a.m.

Related to dec2bin in TRSbook...