Learn R Programming

translateSPSS2R (version 1.0.0)

computeRnd: Rounds values.

Description

Helper Function for xpssCompute. R Implementation of the SPSS RND Function.

Usage

computeRnd(x, digits=2)

Arguments

x
a numeric or complex vector.
digits
atomic numeric argument, indicating the number of decimal places.

Value

returns the rounded values of x with the specified number of decimal places.

See Also

round

Examples

Run this code
xpssCompute(x = fromXPSS, variables = "V5",fun = "computeRnd")

xpssCompute(x = fromXPSS, variables = "V5",fun = "computeRnd",digits=1)

Run the code above in your browser using DataLab