Learn R Programming

⚠️There's a newer version (1.5.0) of this package.Take me there.

matrixStats (version 0.50.0)

Functions that Apply to Rows and Columns of Matrices (and to Vectors)

Description

High-performing functions operating on rows and columns of matrices, e.g. col / rowMedians(), col / rowRanks(), and col / rowSds(). Functions optimized per data type and for subsetted calculations such that both memory usage and processing time is minimized. There are also optimized vector-based methods, e.g. binMeans(), madDiff() and weightedMedians().

Copy Link

Version

Install

install.packages('matrixStats')

Monthly Downloads

1,109,627

Version

0.50.0

License

Artistic-2.0

Issues

Pull Requests

Stars

Forks

Maintainer

Henrik Bengtsson

Last Published

December 13th, 2015

Functions in matrixStats (0.50.0)

xUNDERSCOREOPUNDERSCOREy

Fast calculation of 'z <- x OP y' and 'z <- t(t(x) OP y)'
weightedMedian

Weighted Median Value
validateIndices

Validate indices
rowWeightedMedians

Calculates the weighted medians for each row (column) in a matrix
logSumExp

Accurately computes the logarithm of the sum of exponentials
rowCumsums

Cumulative sums, products, minima and maxima for each row (column) in a matrix
rowDiffs

Calculates difference for each row (column) in a matrix
rowCounts

Counts the number of TRUE values in each row (column) of a matrix
rowProds

Calculates the product for each row (column) in a matrix
rowCollapse

Extracts one cell per row (column) from a matrix
signTabulate

Calculates the number of negative, zero, positive and missing values
rowAvgsPerColSet

Applies a row-by-row (column-by-column) averaging function to equally-sized subsets of matrix columns (rows)
weightedVar

Weighted variance and weighted standard deviation
indexByRow

Translates matrix indices by rows into indices by columns
meanOver

Fast averaging over subset of vector elements
rowOrderStats

Gets an order statistic for each row (column) in a matrix
rowTabulates

Tabulates the values in a matrix by row (column)
rowMedians

Calculates the median for each row (column) in a matrix
varDiff

Estimation of scale based on sequential-order differences
binCounts

Fast element counting in non-overlapping bins
rowIQRs

Estimates of the interquartile range for each row (column) in a matrix
rowSds

Standard deviation estimates for each row (column) in a matrix
rowRanks

Gets the rank of each row (column) of a matrix
sumOver

Fast sum over subset of vector elements
weightedMad

Weighted Median Absolute Deviation (MAD)
anyMissing

Checks if there are any missing values in an object or not
rowLogSumExps

Accurately computes the logarithm of the sum of exponentials across rows or columns
diff2

Fast lagged differences
rowVars

Variance estimates for each row (column) in a matrix
rowQuantiles

Estimates quantiles for each row (column) in a matrix
allocMatrix

Allocates an empty vector, matrix or array
matrixStats-package

Package matrixStats
weightedMean

Weighted Arithmetic Mean
rowRanges

Gets the range of values in each row (column) of a matrix
rowWeightedMeans

Calculates the weighted means for each row (column) in a matrix
binMeans

Fast mean calculations in non-overlapping bins