Math.data.frame
Math Group Method for Data Frame Objects

Description

A group method for functions of the Math group.

Usage

fun(x, digits)

Arguments

x any object which inherits from class "data.frame".
digits arguments for the round and signif functions.

Details

This is a group method for the functions of the Math group (sin(), log(), round(), and so on), which are essentially all functions that return a one-to-one numerical transformation of their (numeric) argument. This method usually results in an error unless all the variables in the data frame are numeric vectors or numeric matrices.
Value
returns a data frame, each variable of which is transformed by the function, fun.
See Also
data.frame, Ops.data.frame
Examples
# round all the non-factors in the wafer data frame
round(Sdatasets::wafer[, sapply(Sdatasets::wafer, function(x) !inherits(x,"factor"))], 2)
Package base version 6.1.2-7
Package Index