round | R Documentation |
Rounds numeric columns in data.frames
## S3 method for class 'data.frame'
ceiling(x)
## S3 method for class 'data.frame'
floor(x)
## S3 method for class 'data.frame'
trunc(x, ...)
## S3 method for class 'data.frame'
round(x, digits = 0)
## S3 method for class 'data.frame'
signif(x, digits = 6)
x |
a data.frame with numeric columns. |
... |
arguments to be passed to methods. |
digits |
integer indicating the number of decimal places ( |
Takes a data.frame and returns a data.frame with the specified function applied to each numeric column.
Eric Archer eric.archer@noaa.gov
Round
data(mtcars)
round(mtcars, 0)
signif(mtcars, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.