base: decimal to base-n

View source: R/bisec-optim.R

baseR Documentation

decimal to base-n

Description

transform decimal integer to other number mode, such as binary (radix = 2)

Usage

base(x, radix, n.digit)

Arguments

x

integer scalar. The number to transform

radix

integer scalar. radix of the target number, 2 for binary, 8 for octal, etc.

n.digit

integer scalar. how many digits the result contains, unused uppper digits are filled by 0

Value

integer. each scalar of the vector represent one digit of the transformed number

Examples

## Not run: 
    base(443L, 3L, 6L)

## End(Not run)

dongzhuoer/bisecpp documentation built on May 20, 2022, 10:52 a.m.