bround {SparkR}R Documentation



Returns the value of the column e rounded to scale decimal places using HALF_EVEN rounding mode if scale >= 0 or at integer part when scale < 0. Also known as Gaussian rounding or bankers' rounding that rounds to the nearest even number. bround(2.5, 0) = 2, bround(3.5, 0) = 4.


## S4 method for signature 'Column'
bround(x, scale = 0)

bround(x, ...)



Column to compute on.


round to scale digits to the right of the decimal point when scale > 0, the nearest even number when scale = 0, and scale digits to the left of the decimal point when scale < 0.


further arguments to be passed to or from other methods.


bround since 2.0.0

See Also

Other math_funcs: acos, acos,Column-method; asin, asin,Column-method; atan2, atan2,Column-method; atan, atan,Column-method; bin, bin, bin,Column-method; cbrt, cbrt, cbrt,Column-method; ceil, ceil, ceil,Column-method, ceiling, ceiling,Column-method; conv, conv, conv,Column,numeric,numeric-method; corr, corr, corr, corr,Column-method, corr,SparkDataFrame-method; cosh, cosh,Column-method; cos, cos,Column-method; covar_pop, covar_pop, covar_pop,characterOrColumn,characterOrColumn-method; cov, cov, cov, cov,SparkDataFrame-method, cov,characterOrColumn-method, covar_samp, covar_samp, covar_samp,characterOrColumn,characterOrColumn-method; expm1, expm1,Column-method; exp, exp,Column-method; factorial, factorial,Column-method; floor, floor,Column-method; hex, hex, hex,Column-method; hypot, hypot, hypot,Column-method; log10, log10,Column-method; log1p, log1p,Column-method; log2, log2,Column-method; log, log,Column-method; pmod, pmod, pmod,Column-method; rint, rint, rint,Column-method; round, round,Column-method; shiftLeft, shiftLeft, shiftLeft,Column,numeric-method; shiftRightUnsigned, shiftRightUnsigned, shiftRightUnsigned,Column,numeric-method; shiftRight, shiftRight, shiftRight,Column,numeric-method; sign, sign,Column-method, signum, signum, signum,Column-method; sinh, sinh,Column-method; sin, sin,Column-method; sqrt, sqrt,Column-method; tanh, tanh,Column-method; tan, tan,Column-method; toDegrees, toDegrees, toDegrees,Column-method; toRadians, toRadians, toRadians,Column-method; unhex, unhex, unhex,Column-method


## Not run: bround(df$c, 0)

[Package SparkR version 2.1.0 Index]