dec2base: Convert Decimal to Base N Number in String

Description Usage Arguments Details Value Author(s) Examples

View source: R/dec2base.R

Description

This function converts the nonnegative integer to the specified base.

Usage

1
2
dec2base(n, base, len=0)
dec2hex(n, len=0)

Arguments

n

Non-negative integer.

base

Number between 2 and 36.

len

Length of the character string.

Details

This function converts the nonnegative integer n to the specified base, where n must be a nonnegative integer smaller than 2^52, base must be an integer between 2 and 36 and len suggests the length of the character string.

Value

The returned argument is a string.

Author(s)

Brandon Whitcher bjw34032@users.sourceforge.net

Examples

1
(x <- dec2base(23, 2))

Example output

oro.dicom: Rigorous - DICOM Input / Output (version = 0.5.0)

[1] "10111"

oro.dicom documentation built on May 2, 2019, 6:07 p.m.