convertBase: Convert string representations of numbers in any base to any...

Description Usage Arguments See Also Examples

Description

Convert string representations of numbers in any base to any other base.

Usage

1
convertBase(x, base1 = 10, base2 = 10)

Arguments

x

a vector of integers or strings to be converted

base1

the base of x

base2

the base of the output

See Also

as.octmode

as.hexmode

strtoi

Examples

1
2
3
4
5
identical(convertBase(1234,base2=8),as.character(as.octmode(1234)))

convertBase(17771,base1=8,base2=30)
convertBase(17771,base1=8,base2=10)
convertBase(8185,base1=10,base2=30)

grr documentation built on May 2, 2019, 5:57 a.m.

Related to convertBase in grr...