powered by
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)
# 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.
round
signif
Eric Archer eric.archer@noaa.gov
Takes a data.frame and returns a data.frame with the specified function applied to each numeric column.
Round
data(mtcars) round(mtcars, 0) signif(mtcars, 2)
Run the code above in your browser using DataLab