Learn R Programming

mnorm (version 1.2.2)

fromBase: Convert base representation of a number into integer

Description

Converts base representation of a number into integer.

Usage

fromBase(x, base = 2L)

Value

The function returns a positive integer that is a conversion from base under given coefficients x.

Arguments

x

vector of positive integer coefficients representing the number in base that is base.

base

positive integer representing the base.

Examples

Run this code
fromBase(c(1, 2, 0, 2, 3), 5)

Run the code above in your browser using DataLab