colStatistics | R Documentation |
applies statistical functions to all columns of a data frame
colStatistics(
dataFrame,
functions = c("sum", "mean", "min", "max", "number.na", "length"),
na.rm = FALSE,
functionColumn = FALSE
)
dataFrame |
data frame with numeric columns only |
functions |
vector of statistical functions to be applied on each column of dataFrame possible values: "sum", "mean", "min", "max", "number.na" (number of NA values), "length" (number of values) |
na.rm |
if TRUE, NA values are removed before applying the statistical function(s) |
functionColumn |
if TRUE, a column containing the function name is contained in the result data frame, otherwise the function names become the row names of the result data frame |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.