decimal_place {iprior}R Documentation

Cut a numeric vector to a certain number of decimal places

Description

Cut a numeric vector to a certain number of decimal places

Usage

decimal_place(x, k = 2)

dec_plac(x, k = 2)

Arguments

x

A numeric vector.

k

The number of decimal places.

Value

A character vector with the correct number of decimal places.

Examples

decimal_place(pi, 3)
decimal_place(c(exp(1), pi, sqrt(2)), 4)


[Package iprior version 0.7.4 Index]