Learn R Programming

matrixStats (version 1.4.1)

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 weightedMedian().

Copy Link

Version

Install

install.packages('matrixStats')

Monthly Downloads

243,869

Version

1.4.1

License

Artistic-2.0

Issues

Pull Requests

Stars

Forks

Last Published

September 8th, 2024

Functions in matrixStats (1.4.1)

allocMatrix

Allocates an empty vector, matrix or array
anyMissing

Checks if there are any missing values in an object or not
matrixStats-package

Package matrixStats
binMeans

Fast mean calculations in non-overlapping bins
rowMeans2

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

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

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

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

Checks if a value exists / does not exist in each row (column) of a matrix
rowAvgsPerColSet

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

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

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

Counts the number of occurrences of a specific value
diff2

Fast lagged differences
weightedMedian

Weighted Median Value
rowSums2

Calculates the sum for each row (column) in a matrix
matrixStats.options

Options used for matrixStats
mean2

Fast averaging over subset of vector elements
rowRanks

Gets the rank of the elements in each row (column) of a matrix
weightedVar

Weighted variance and weighted standard deviation
rowMads

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

Tabulates the values in a matrix by row (column).
rowWeightedMedians

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

Translates matrix indices by rows into indices by columns
rowIQRs

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

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

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

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

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

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

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

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

Fast sum over subset of vector elements
product

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

Estimation of scale based on sequential-order differences
weightedMad

Weighted Median Absolute Deviation (MAD)
weightedMean

Weighted Arithmetic Mean
logSumExp

Accurately computes the logarithm of the sum of exponentials
binCounts

Fast element counting in non-overlapping bins