fround: Formating the Rounding of Numbers

froundR Documentation

Formating the Rounding of Numbers

Description

fround rounds the values in its first argument to the specified number of decimal places with surrounding quotes.

pfround rounds the values in its first argument to the specified number of decimal places without surrounding quotes.

Usage

fround(x, digits)
pfround(x, digits)

Arguments

x

a numeric vector.

digits

integer indicating the precision to be used.

Author(s)

Andrew Gelman gelman@stat.columbia.edu; Yu-Sung Su suyusung@tsinghua.edu.cn

See Also

round

Examples

    x <- rnorm(1)
    fround(x, digits=2)
    pfround(x, digits=2)

arm documentation built on April 1, 2024, 3:01 p.m.

Related to fround in arm...