colStatistics: Column Statistics

View source: R/stat.R

colStatisticsR Documentation

Column Statistics

Description

applies statistical functions to all columns of a data frame

Usage

colStatistics(
  dataFrame,
  functions = c("sum", "mean", "min", "max", "number.na", "length"),
  na.rm = FALSE,
  functionColumn = FALSE
)

Arguments

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


KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.