dec2base {DICOM}R Documentation

Convert Decimal to Base N Number in String

Description

This function converts the nonnegative integer to the specified base.

Usage

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. n must be a nonnegative integer smaller than $2^52$, base must be an integer between 2 and 36 and len suggests the lengt of the character string.

Value

The returned argument is a string.

Author(s)

B. Whitcher

Examples

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

[Package DICOM version 0.12 Index]