Math
group.
fun(x, digits)
fun
, from the Math group,
inherits from class
"data.frame"
.
digits
arguments for the
round
and
signif
functions.
This is a group method for the functions of the
Math
group (
sin()
,
log()
,
round()
, etc), which are essentially all functions that return a one-to-one
numerical transformation of their (numeric) argument.
This method will generally result in an error unless all the variables in
the data frame are numeric vectors or numeric matrices.
# round all the non-factors in a data frame round(wafer[, sapply(wafer, function(x) !inherits(x,"factor"))], 2)