toBase function

Convert integer value to other base

Convert integer value to other base

Converts integer value to other base.

toBase(x, base = 2L)

Arguments

  • x: positive integer representing the number to convert.
  • base: positive integer representing the base.

Returns

The function returns a numeric vector containing representation of x in a base given in base.

Examples

toBase(888, 5)
  • Maintainer: Bogdan Potanin
  • License: GPL (>= 2)
  • Last published: 2023-11-29

Useful links