Learn R Programming

wle (version 0.9-91)

binary: Convert decimal base number to binary base

Description

Convert decimal base number to binary base.

Usage

binary(x, dim)

Arguments

x
a number in decibal base.
dim
the number of digits, if missing the right number of digits is evaluated.

Value

binary
a vector representing the `x` number in binary base.
dicotomy
the same as `binary` but `TRUE` and `FALSE` instead of 1 and 0.

Examples

Run this code
binary(2)
binary(10,dim=5)

Run the code above in your browser using DataLab