Functions that Apply to Rows and Columns of Matrices (and to Vectors)
Overview
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().
Significant Changes
- Package now requires R (>= 3.4.0) [2017-04-21], because the next release of R will have stricter C header requirements that are not backward compatible with older versions of R.
Deprecated and Defunct
- The hidden R options for deescalating the error for using
useNames = NAto a warning has been removed;useNames = NAis now always an error. - Calling
colRanks()androwRanks()without explicitly specifying argumentties.methodis deprecated since version 1.3.0 [2024-04-10]. If not explicitly specified, a deprecation warning is now produced every 10:th call not specifying theties.methodargument.
Show all changes in 1.5.0Hide the rest of the changes in 1.5.0
Bug Fixes
- The error message of
colTabulates()androwTabulates()asserting that double values are passed, reported on the class of the input data, not the storage type.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-30
- ERROR13 OK, 1 ERROR2026-03-29
- OK14 OK2026-03-10
Documentation
- Help pages
- 39 (8 internal)includes a package overview page
- Examples that run
- 96%23 run in a plain check · 1 never run
- Exported functions with examples
- 62%
- Documented parameters
- 94%
- Return-value docs
- 100%
- Help pages citing references
- 10%
Downloads
Repository
- PRs merged (all time)
- 74%
- Median days to close, 50 most recently updated closed issues
- 20
- Median days to close, 50 most recently updated closed PRs
- 1
Stars over time
Forks over time
Issues over time
PRs over time
Commits over time
Commit identities over time
9 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/henrikbengtsson/matrixstats on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Show all practicesHide 2 practices
Dependencies
Installing matrixStats adds no packages beyond those that come with R.
Show the 48 most downloaded dependentsHide the 48 most downloaded dependents
and 250 more dependents and 29 packages that suggest it on CRAN ↗
Code & Tests
People & History
Show 5 more contributorsHide 5 contributors
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 1.5.0Latest
- 1.4.12024-09-08 · diff ↗
- 1.4.02024-09-04 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 1.3.0
- 1.2.02023-12-11 · diff ↗
- 1.1.02023-11-07 · diff ↗
- 1.0.02023-06-02 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 0.63.02022-11-18 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 0.62.02022-04-19 · diff ↗
- 0.61.02021-09-17 · diff ↗
- 0.60.12021-08-23 · diff ↗
Show 64 earlier eventsHide 64 earlier events
- 0.60.02021-07-26 · diff ↗
- 0.59.0
- RR 4.1.0 released · 2021-05-18
- 0.58.02021-01-30 · diff ↗
- 0.57.02020-09-26 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 0.56.02020-03-13 · diff ↗
- 0.55.02019-09-07 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 0.54.02018-07-23 · diff ↗
- RR 3.5.0 released · 2018-04-23
- 0.53.12018-02-11 · diff ↗
- 0.53.02018-01-24 · diff ↗
- RR 3.4.0 released · 2017-04-21
- 0.52.22017-04-14 · diff ↗
- 0.52.12017-04-05 · diff ↗
- 0.52.02017-04-04 · diff ↗ ·
added 8 exports
colAnyNAs, colMeans2, colSums2, mean2, rowAnyNAs, rowMeans2, rowSums2, sum2 - 0.51.02016-10-09 · diff ↗
- RR 3.3.0 released · 2016-05-03
- 0.50.22016-04-24 · diff ↗
- 0.50.12015-12-15 · diff ↗
- 0.50.0
- 0.15.02015-10-27 · diff ↗
- 0.14.22015-06-24 · diff ↗
- 0.14.12015-06-20 · diff ↗ ·
removed 1 export
pattern:^[^\\.]added 96 exports
allocVector, allocMatrix, allocArray, allValue, anyMissing, anyValue, binCounts, binMeans, colAlls, colAnys, colAnyMissings, colAvgsPerRowSet, colCollapse, colCounts, colCummins, colCummaxs, colCumprods, colCumsums, colDiffs, colIQRs, colIQRDiffs, colLogSumExps, colMadDiffs, colMads, colMaxs, colMedians, colMins, colOrderStats, colProds, colQuantiles and 66 more - RR 3.2.0 released · 2015-04-16
- 0.14.02015-02-14 · diff ↗
- 0.13.12015-01-22 · diff ↗
- 0.13.02015-01-21 · diff ↗ ·
added 23 exports
allValue, anyValue, colAnyMissings, colIQRDiffs, colMadDiffs, colSdDiffs, colVarDiffs, colWeightedMads, colWeightedSds, colWeightedVars, count, diff2, iqr, iqrDiff, rowAnyMissings, rowIQRDiffs, rowMadDiffs, rowSdDiffs, rowVarDiffs, rowWeightedMads, rowWeightedSds, rowWeightedVars, weightedMean - 0.12.22014-12-07 · diff ↗
- 0.12.02014-12-07 · diff ↗ ·
added 15 exports
allocVector, allocMatrix, allocArray, colCummins, colCummaxs, colCumprods, colCumsums, meanOver, rowCummins, rowCummaxs, rowCumprods, rowCumsums, sumOver, x_OP_y, t_tx_OP_y - 0.10.32014-10-15 · diff ↗
- 0.10.02014-06-08 · diff ↗
- 0.9.72014-06-06 · diff ↗ ·
removed 1 export
pattern:^[^\\.]added 58 exports
anyMissing, binCounts, binMeans, colAlls, colAnys, colAvgsPerRowSet, colCollapse, colCounts, colDiffs, colIQRs, colLogSumExps, colMads, colMaxs, colMedians, colMins, colOrderStats, colProds, colQuantiles, colRanges, colRanks, colSds, colTabulates, colVars, colWeightedMeans, colWeightedMedians, indexByRow, logSumExp, madDiff, product, rowAlls and 28 more - 0.8.152014-06-05 · diff ↗ ·
removed 96 exports
allocVector, allocMatrix, allocArray, allValue, anyMissing, anyValue, binCounts, binMeans, colAlls, colAnys, colAnyMissings, colAvgsPerRowSet, colCollapse, colCounts, colCummins, colCummaxs, colCumprods, colCumsums, colDiffs, colIQRs, colIQRDiffs, colLogSumExps, colMadDiffs, colMads, colMaxs, colMedians, colMins, colOrderStats, colProds, colQuantiles and 66 moreadded 1 export
pattern:^[^\\.] - RR 3.1.0 released · 2014-04-10
- 0.8.142014-01-05 · diff ↗
- 0.8.122013-09-27 · diff ↗
- 0.8.102013-09-16 · diff ↗
- 0.8.52013-07-15 · diff ↗
- 0.8.12013-05-02 · diff ↗
- 0.8.02013-05-02 · diff ↗
- RR 3.0.0 released · 2013-04-03
- 0.6.22012-11-16 · diff ↗
- 0.5.32012-09-13 · diff ↗
- 0.5.22012-07-03 · diff ↗
- 0.5.02012-05-06 · diff ↗
- RR 2.15.0 released · 2012-03-30
- 0.4.42012-03-06 · diff ↗
- 0.4.32011-12-13 · diff ↗
- 0.4.02011-11-12 · diff ↗
- RR 2.14.0 released · 2011-10-31
- 0.3.02011-10-14 · diff ↗
- RR 2.13.0 released · 2011-04-13
- RR 2.12.0 released · 2010-10-15
- 0.2.22010-10-12 · diff ↗
- RR 2.11.0 released · 2010-04-22
- 0.2.12010-04-05 · diff ↗
- 0.1.92010-02-04 · diff ↗
- 0.1.82009-11-13 · diff ↗
- RR 2.10.0 released · 2009-10-26
- 0.1.62009-06-18 · diff ↗
- 0.1.52009-06-14
- RR 2.9.0 released · 2009-04-17
Package metadata
- First published
- 2009-06-14
- Total releases
- 59 / 17 yrs
- License
- Artistic-2.0 OSI
- Minimum R
- ≥ 3.4.0
- Download size
- 207 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("matrixStats")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-19, which the citation names so these numbers can be found later. More on citing and the projects behind them.