dec2base: Convert decimal integer to arbitrary base

Description Usage Arguments Value Functions

Description

Convert a non-negative decimal integer to an arbitrary base with arbitrary symbols.

Usage

1
2
3
dec2base(x, base, drop_leading = TRUE, width = 1L)

dec2alpha(x, lower = FALSE, ...)

Arguments

x

Vector of non-negative integers to convert

base

Either a positive integer specifying the base number or a character string of the symbols to use for the base. If base is a number, then the default symbols are: 0, ..., 9, A, ..., Z.

drop_leading

If TRUE, for positive numbers, any leading zeros are dropped.

width

Minimum width of the strings, they will be padded with zeros to at least that length.

lower

If TRUE, use lower case letters as well as upper case letters.

...

Arguments passed to dec2base.

Value

A character vector of the integers in the new base

Functions


jrnold/textools documentation built on May 20, 2019, 2:06 a.m.