colMedians
Column Summaries - median, quantile, and product

Description

Computes median, quantile, and product for each column. These are generic functions; methods currently exist for data.frame, series objects.

Usage

colMedians(x, na.rm = FALSE)
colQuantiles(x, probs = seq(0, 1, 0.25), na.rm = FALSE)
colProds(x, na.rm = FALSE)

Arguments

x a matrix, data frame, timeSeries, or signalSeries object.
na.rm if FALSE, missing values (NAs) in the input result in missing values in corresponding elements of the output. If TRUE then missing values are omitted from calculations.
probs vector of desired probability levels. Values must be between 0 and 1 inclusive. The default produces a "five number summary": the minimum, lower quartile, median, upper quartile, and maximum of x.

Details

colMedians is equivalent to apply(x, 2, FUN = median); colQuantiles is equivalent to apply(x, 2, FUN = quantile); colProds is equivalent to apply(x, 2, FUN = prod).
Value
a vector of column medians for colMedians; a list of vectors of quantiles for each column for colQuantiles; a vector of column products for colProds.
Differences between Spotfire Enterprise Runtime for R and Open-source R
colMedians, colQuantiles, and colProds are not in open-source R.
See Also
apply, median, quantile, prod, colMins, colMeans.
Examples
colMedians(Sdatasets:air[, c("Wind", "temperature")])

colQuantiles(Sdatasets::air[, c("ozone", "radiation", "wind")], na.rm=TRUE)

Package terrUtils version 6.1.4-13
Package Index