Free Access Week-  Data Engineering + BI
Data engineering and BI courses are free!
Free AI Access Week from June 2-8

surveyplanning (version 4.0)

round2: Rounding numbers

Description

The function rounds the values in its first argument to the specified number of decimal places (default 0).

Usage

round2(x, n)

Arguments

x

a numeric vector.

n

integer indicating the number of decimal places.

Value

Rounded value

See Also

expsize, dom_optimal_allocation

Examples

Run this code
# NOT RUN {
dar <- 100 * runif(3)
dar
round2(dar, 1)

# }

Run the code above in your browser using DataLab