Learn R Programming

rapidsplithalf (version 0.6)

colAggregators: Fast matrix column aggregators

Description

Fast matrix column aggregators

Usage

colMedians(x)

colProds(x)

colSds(x)

colMediansMasked(x, mask)

colMeansMasked(x, mask)

colSdsMasked(x, mask)

Value

A numeric vector representing values aggregated by column.

Arguments

x

A numeric matrix to compute column aggregates of.

mask

A logical matrix determining which data points to include in the column-wise aggregations.

Author

Sercan Kahveci

See Also

colMeans, mediansByMask, maskAggregators

Examples

Run this code
x <- cbind(x1 = 3, x2 = c(4:1, 2:5))
colMedians(x)

colProds(x)

colSds(x)

mask<-cbind(rep(c(TRUE,FALSE),4),
            rep(c(TRUE,FALSE),each=4))
colMediansMasked(x,mask)

colMeansMasked(x,mask)

colSdsMasked(x,mask)

Run the code above in your browser using DataLab