round {swfscMisc} | R Documentation |
Rounding Numbers for Data Frames
Description
Rounds numeric columns in data.frames
Usage
## 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)
Arguments
x |
a data.frame with numeric columns. |
... |
arguments to be passed to methods. |
digits |
integer indicating the number of decimal places ( |
Details
Takes a data.frame and returns a data.frame with the specified function applied to each numeric column.
Author(s)
Eric Archer eric.archer@noaa.gov
See Also
Examples
data(mtcars)
round(mtcars, 0)
signif(mtcars, 2)
[Package swfscMisc version 1.6.5 Index]