Package: matrixStats 1.5.0-9000

Henrik Bengtsson

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

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

Authors:Henrik Bengtsson [aut, cre, cph], Constantin Ahlmann-Eltze [ctb], Hector Corrada Bravo [ctb], Robert Gentleman [ctb], Jan Gleixner [ctb], Peter Hickey [ctb], Ola Hossjer [ctb], Harris Jaffee [ctb], Dongcan Jiang [ctb], Peter Langfelder [ctb], Brian Montgomery [ctb], Angelina Panagopoulou [ctb], Hugh Parsonage [ctb], Jakob Peder Pettersen [ctb]

matrixStats_1.5.0-9000.tar.gz
matrixStats_1.5.0-9000.zip(r-4.7)matrixStats_1.5.0-9000.zip(r-4.6)matrixStats_1.5.0-9000.zip(r-4.5)
matrixStats_1.5.0-9000.tgz(r-4.6-x86_64)matrixStats_1.5.0-9000.tgz(r-4.6-arm64)matrixStats_1.5.0-9000.tgz(r-4.5-x86_64)matrixStats_1.5.0-9000.tgz(r-4.5-arm64)
matrixStats_1.5.0-9000.tar.gz(r-4.7-arm64)matrixStats_1.5.0-9000.tar.gz(r-4.7-x86_64)matrixStats_1.5.0-9000.tar.gz(r-4.6-arm64)matrixStats_1.5.0-9000.tar.gz(r-4.6-x86_64)
matrixStats_1.5.0-9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
matrixStats/json (API)
NEWS

# Install 'matrixStats' in R:
install.packages('matrixStats', repos = c('https://fastverse.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/henrikbengtsson/matrixstats/issues

On CRAN:

Conda:

matrixperformancevector

18.04 score 214 stars 2.5k packages 24k scripts 481k downloads 46 mentions 102 exports 0 dependencies

Last updated from:2fe4030b9e. Checks:11 NOTE, 2 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64NOTE181
linux-devel-x86_64NOTE189
source / vignettesOK176
linux-release-arm64NOTE175
linux-release-x86_64NOTE192
macos-release-arm64NOTE134
macos-release-x86_64NOTE308
macos-oldrel-arm64NOTE117
macos-oldrel-x86_64NOTE247
windows-develNOTE201
windows-releaseNOTE211
windows-oldrelNOTE142
wasm-releaseOK101

Exports:allocArrayallocMatrixallocVectorallValueanyMissinganyValuebinCountsbinMeanscolAllscolAnyMissingscolAnyNAscolAnyscolAvgsPerRowSetcolCollapsecolCountscolCummaxscolCumminscolCumprodscolCumsumscolDiffscolIQRDiffscolIQRscolLogSumExpscolMadDiffscolMadscolMaxscolMeans2colMedianscolMinscolOrderStatscolProdscolQuantilescolRangescolRankscolSdDiffscolSdscolSums2colTabulatescolVarDiffscolVarscolWeightedMadscolWeightedMeanscolWeightedMedianscolWeightedSdscolWeightedVarscountdiff2indexByRowiqriqrDifflogSumExpmadDiffmean2productrowAllsrowAnyMissingsrowAnyNAsrowAnysrowAvgsPerColSetrowCollapserowCountsrowCummaxsrowCumminsrowCumprodsrowCumsumsrowDiffsrowIQRDiffsrowIQRsrowLogSumExpsrowMadDiffsrowMadsrowMaxsrowMeans2rowMediansrowMinsrowOrderStatsrowProdsrowQuantilesrowRangesrowRanksrowSdDiffsrowSdsrowSums2rowTabulatesrowVarDiffsrowVarsrowWeightedMadsrowWeightedMeansrowWeightedMediansrowWeightedSdsrowWeightedVarssdDiffsignTabulatesum2t_tx_OP_yvarDiffweightedMadweightedMeanweightedMedianweightedSdweightedVarx_OP_y

Dependencies:

matrixStats: Summary of functions

Rendered frommatrixStats-methods.md.rspusingR.rsp::rspon May 24 2026.

Last update: 2019-07-21
Started: 2014-12-20

Readme and manuals

Help Manual

Help pageTopics
Package matrixStatsmatrixStats-package matrixStats
Checks if there are any missing values in an object or notanyMissing colAnyMissings colAnyNAs rowAnyMissings rowAnyNAs
Fast element counting in non-overlapping binsbinCounts
Fast mean calculations in non-overlapping binsbinMeans
Translates matrix indices by rows into indices by columnsindexByRow
Accurately computes the logarithm of the sum of exponentialslogSumExp
Calculates the product for each row (column) in a matrixcolProds product rowProds
Checks if a value exists / does not exist in each row (column) of a matrixallValue anyValue colAlls colAnys rowAlls rowAnys
Extracts one cell per row (column) from a matrixcolCollapse rowCollapse
Counts the number of occurrences of a specific valuecolCounts count rowCounts
Cumulative sums, products, minima and maxima for each row (column) in a matrixcolCummaxs colCummins colCumprods colCumsums rowCummaxs rowCummins rowCumprods rowCumsums
Calculates difference for each row (column) in a matrixcolDiffs rowDiffs
Estimates of the interquartile range for each row (column) in a matrixcolIQRs iqr rowIQRs
Accurately computes the logarithm of the sum of exponentials across rows or columnscolLogSumExps rowLogSumExps
Standard deviation estimates for each row (column) in a matrixcolMads colSds rowMads rowSds
Calculates the mean for each row (column) in a matrixcolMeans2 rowMeans2
Calculates the median for each row (column) in a matrixcolMedians rowMedians
Gets an order statistic for each row (column) in a matrixcolOrderStats rowOrderStats
Estimates quantiles for each row (column) in a matrixcolQuantiles rowQuantiles
Gets the range of values in each row (column) of a matrixcolMaxs colMins colRanges rowMaxs rowMins rowRanges
Gets the rank of the elements in each row (column) of a matrixcolRanks rowRanks
Calculates the sum for each row (column) in a matrixcolSums2 rowSums2
Tabulates the values in a matrix by row (column).colTabulates rowTabulates
Variance estimates for each row (column) in a matrixcolVars rowVars
Calculates the weighted means for each row (column) in a matrixcolWeightedMeans rowWeightedMeans
Calculates the weighted medians for each row (column) in a matrixcolWeightedMedians rowWeightedMedians
Estimation of scale based on sequential-order differencescolIQRDiffs colMadDiffs colSdDiffs colVarDiffs iqrDiff madDiff rowIQRDiffs rowMadDiffs rowSdDiffs rowVarDiffs sdDiff varDiff
Weighted Median Absolute Deviation (MAD)colWeightedMads rowWeightedMads weightedMad
Weighted Arithmetic MeanweightedMean
Weighted Median ValueweightedMedian
Weighted variance and weighted standard deviationcolWeightedSds colWeightedVars rowWeightedSds rowWeightedVars weightedSd weightedVar