round2 {surveyplanning}R Documentation

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

dar <- 100 * runif(3)
dar
round2(dar, 1)


[Package surveyplanning version 4.0 Index]