decimal_place: Cut a numeric vector to a certain number of decimal places

View source: R/Utilities.R

decimal_placeR 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)


haziqj/iprior documentation built on April 4, 2024, 3:40 p.m.