intToNumeralSystem: Convert Integers to Numeral System

View source: R/convert.R

intToNumeralSystemR Documentation

Convert Integers to Numeral System

Description

Convert Integers to Numeral System

Usage

intToNumeralSystem(x, base)

Arguments

x

vector of integers

base

base of the numeral system

Value

matrix with as many rows as there are elements in x and as many columns as digits that are required to represent the integers in x in the numeral system in base base. The elements of x appear as row names whereas the powers of base appear as column names.

Examples

intToNumeralSystem(1:16, base = 2) # binary system
intToNumeralSystem(1:16, base = 10) # decimal system
intToNumeralSystem(1:16, base = 8) # octal system

KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.