Formating the Rounding of Numbers
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.
fround(x, digits) pfround(x, digits)
x |
a numeric vector. |
digits |
integer indicating the precision to be used. |
Andrew Gelman gelman@stat.columbia.edu; Yu-Sung Su suyusung@tsinghua.edu.cn
x <- rnorm(1) fround(x, digits=2) pfround(x, digits=2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.