fround: Formating the Rounding of Numbers

Description Usage Arguments Author(s) See Also Examples

View source: R/fround.R

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

1
2
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

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

arm documentation built on May 31, 2017, 3:34 a.m.

Search within the arm package
Search all R packages, documentation and source code