
Last chance! 50% off unlimited learning
Sale ends in
Rounds numeric columns in data.frames
# S3 method for data.frame
ceiling(x)# S3 method for data.frame
floor(x)
# S3 method for data.frame
trunc(x, ...)
# S3 method for data.frame
round(x, digits = 0)
# S3 method for data.frame
signif(x, digits = 6)
a data.frame with numeric columns.
arguments to be passed to methods.
integer indicating the number of decimal places (round
)
or significant digits (signif
) to be used. See round
for
more details.
Takes a data.frame and returns a data.frame with the specified function applied to each numeric column.
# NOT RUN {
data(mtcars)
round(mtcars, 0)
signif(mtcars, 2)
# }
Run the code above in your browser using DataLab