powered by
fround rounds the values in its first argument to the specified number of decimal places with surrounding quotes.
fround
pfround rounds the values in its first argument to the specified number of decimal places without surrounding quotes.
pfround
fround(x, digits) pfround(x, digits)
a numeric vector.
integer indicating the precision to be used.
Andrew Gelman gelman@stat.columbia.edu; Yu-Sung Su suyusung@tsinghua.edu.cn
round
x <- rnorm(1) fround(x, digits=2) pfround(x, digits=2)
Run the code above in your browser using DataLab