SparkR (version 2.1.2)

conv: conv

Description

Convert a number in a string column from one base to another.

Usage

conv(x, fromBase, toBase)

# S4 method for Column,numeric,numeric conv(x, fromBase, toBase)

Arguments

x

column to convert.

fromBase

base to convert from.

toBase

base to convert to.

See Also

Other math_funcs: acos, asin, atan2, atan, bin, bround, cbrt, ceil, corr, cosh, cos, covar_pop, cov, expm1, exp, factorial, floor, hex, hypot, log10, log1p, log2, log, pmod, rint, round, shiftLeft, shiftRightUnsigned, shiftRight, signum, sinh, sin, sqrt, tanh, tan, toDegrees, toRadians, unhex

Examples

Run this code
# NOT RUN {
conv(df$n, 2, 16)
# }

Run the code above in your browser using DataLab