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

Share:

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

Author
Henrik Bengtsson [aut, cre, cph], Hector Corrada Bravo [ctb], Robert Gentleman [ctb], Ola Hossjer [ctb], Harris Jaffee [ctb], Dongcan Jiang [ctb], Peter Langfelder [ctb]
Date of publication
2016-10-09 09:15:25
Maintainer
Henrik Bengtsson <henrikb@braju.com>
License
Artistic-2.0
Version
0.51.0
URLs

View on CRAN

Man pages

allocMatrix
Allocates an empty vector, matrix or array
anyMissing
Checks if there are any missing values in an object or not
binCounts
Fast element counting in non-overlapping bins
binMeans
Fast mean calculations in non-overlapping bins
diff2
Fast lagged differences
indexByRow
Translates matrix indices by rows into indices by columns
logSumExp
Accurately computes the logarithm of the sum of exponentials
matrixStats-package
Package matrixStats
meanOver
Fast averaging over subset of vector elements
rowAvgsPerColSet
Applies a row-by-row (column-by-column) averaging function to...
rowCollapse
Extracts one cell per row (column) from a matrix
rowCounts
Counts the number of TRUE values in each row (column) of a...
rowCumsums
Cumulative sums, products, minima and maxima for each row...
rowDiffs
Calculates difference for each row (column) in a matrix
rowIQRs
Estimates of the interquartile range for each row (column) in...
rowLogSumExps
Accurately computes the logarithm of the sum of exponentials...
rowMedians
Calculates the median for each row (column) in a matrix
rowOrderStats
Gets an order statistic for each row (column) in a matrix
rowProds
Calculates the product for each row (column) in a matrix
rowQuantiles
Estimates quantiles for each row (column) in a matrix
rowRanges
Gets the range of values in each row (column) of a matrix
rowRanks
Gets the rank of each row (column) of a matrix
rowSds
Standard deviation estimates for each row (column) in a...
rowTabulates
Tabulates the values in a matrix by row (column)
rowVars
Variance estimates for each row (column) in a matrix
rowWeightedMeans
Calculates the weighted means for each row (column) in a...
rowWeightedMedians
Calculates the weighted medians for each row (column) in a...
signTabulate
Calculates the number of negative, zero, positive and missing...
sumOver
Fast sum over subset of vector elements
validateIndices
Validate indices
varDiff
Estimation of scale based on sequential-order differences
weightedMad
Weighted Median Absolute Deviation (MAD)
weightedMean
Weighted Arithmetic Mean
weightedMedian
Weighted Median Value
weightedVar
Weighted variance and weighted standard deviation
xUNDERSCOREOPUNDERSCOREy
Fast calculation of 'z <- x OP y' and 'z <- t(t(x) OP y)'

Files in this package

matrixStats
matrixStats/inst
matrixStats/inst/benchmarking
matrixStats/inst/benchmarking/colRowAlls.md.rsp
matrixStats/inst/benchmarking/binMeans.md.rsp
matrixStats/inst/benchmarking/x_OP_y.md.rsp
matrixStats/inst/benchmarking/colRowAlls_subset.md.rsp
matrixStats/inst/benchmarking/colRowWeightedMeans_subset.md.rsp
matrixStats/inst/benchmarking/varDiff.md.rsp
matrixStats/inst/benchmarking/meanOver.md.rsp
matrixStats/inst/benchmarking/colRowMedians.md.rsp
matrixStats/inst/benchmarking/colRowCummins.md.rsp
matrixStats/inst/benchmarking/colRowCumsums.md.rsp
matrixStats/inst/benchmarking/colRowProds_subset.md.rsp
matrixStats/inst/benchmarking/colRowAnyMissings.md.rsp
matrixStats/inst/benchmarking/colRowMins.md.rsp
matrixStats/inst/benchmarking/colRowAnyMissings_subset.md.rsp
matrixStats/inst/benchmarking/includes
matrixStats/inst/benchmarking/includes/footer.md.rsp
matrixStats/inst/benchmarking/includes/header.md.rsp
matrixStats/inst/benchmarking/includes/results.md.rsp
matrixStats/inst/benchmarking/includes/setup.md.rsp
matrixStats/inst/benchmarking/includes/references.md.rsp
matrixStats/inst/benchmarking/includes/appendix.md.rsp
matrixStats/inst/benchmarking/colRowOrderStats.md.rsp
matrixStats/inst/benchmarking/product_subset.md.rsp
matrixStats/inst/benchmarking/colRowAnys_subset.md.rsp
matrixStats/inst/benchmarking/colRowCounts.md.rsp
matrixStats/inst/benchmarking/colRowMads.md.rsp
matrixStats/inst/benchmarking/index.md.rsp
matrixStats/inst/benchmarking/sumOver.md.rsp
matrixStats/inst/benchmarking/binMeans_subset.md.rsp
matrixStats/inst/benchmarking/colRowDiffs_subset.md.rsp
matrixStats/inst/benchmarking/colRowCounts_subset.md.rsp
matrixStats/inst/benchmarking/colRowWeightedMedians_subset.md.rsp
matrixStats/inst/benchmarking/product.md.rsp
matrixStats/inst/benchmarking/indexByRow.md.rsp
matrixStats/inst/benchmarking/R
matrixStats/inst/benchmarking/R/random-matrices.R
matrixStats/inst/benchmarking/R/random-vectors.R
matrixStats/inst/benchmarking/colRowDiffs.md.rsp
matrixStats/inst/benchmarking/meanOver_subset.md.rsp
matrixStats/inst/benchmarking/colRowMedians_subset.md.rsp
matrixStats/inst/benchmarking/anyMissing.md.rsp
matrixStats/inst/benchmarking/colRowCummins_subset.md.rsp
matrixStats/inst/benchmarking/colRowCumprods.md.rsp
matrixStats/inst/benchmarking/colRowTabulates.md.rsp
matrixStats/inst/benchmarking/colRowRanges.md.rsp
matrixStats/inst/benchmarking/colRowRanks_subset.md.rsp
matrixStats/inst/benchmarking/x_OP_y_subset.md.rsp
matrixStats/inst/benchmarking/allocVector.md.rsp
matrixStats/inst/benchmarking/colRowLogSumExps_subset.md.rsp
matrixStats/inst/benchmarking/colRowMeans.md.rsp
matrixStats/inst/benchmarking/weightedMean_subset.md.rsp
matrixStats/inst/benchmarking/t_tx_OP_y.md.rsp
matrixStats/inst/benchmarking/colRowMins_subset.md.rsp
matrixStats/inst/benchmarking/madDiff.md.rsp
matrixStats/inst/benchmarking/colRowTabulates_subset.md.rsp
matrixStats/inst/benchmarking/colRowQuantiles_subset.md.rsp
matrixStats/inst/benchmarking/colRowQuantiles.md.rsp
matrixStats/inst/benchmarking/weightedMean.md.rsp
matrixStats/inst/benchmarking/colRowWeightedMeans.md.rsp
matrixStats/inst/benchmarking/colRowVars_subset.md.rsp
matrixStats/inst/benchmarking/count.md.rsp
matrixStats/inst/benchmarking/colRowCumprods_subset.md.rsp
matrixStats/inst/benchmarking/weightedMedian.md.rsp
matrixStats/inst/benchmarking/anyMissing_subset.md.rsp
matrixStats/inst/benchmarking/binCounts.md.rsp
matrixStats/inst/benchmarking/colRowLogSumExps.md.rsp
matrixStats/inst/benchmarking/logSumExp.md.rsp
matrixStats/inst/benchmarking/colRowRanks.md.rsp
matrixStats/inst/benchmarking/count_subset.md.rsp
matrixStats/inst/benchmarking/binCounts_subset.md.rsp
matrixStats/inst/benchmarking/colRowWeightedMedians.md.rsp
matrixStats/inst/benchmarking/madDiff_subset.md.rsp
matrixStats/inst/benchmarking/weightedMedian_subset.md.rsp
matrixStats/inst/benchmarking/colRowVars.md.rsp
matrixStats/inst/benchmarking/colRowSums.md.rsp
matrixStats/inst/benchmarking/colRowAnys.md.rsp
matrixStats/inst/benchmarking/varDiff_subset.md.rsp
matrixStats/inst/benchmarking/allocMatrix.md.rsp
matrixStats/inst/benchmarking/colRowOrderStats_subset.md.rsp
matrixStats/inst/benchmarking/t_tx_OP_y_subset.md.rsp
matrixStats/inst/benchmarking/colRowProds.md.rsp
matrixStats/inst/benchmarking/colRowRanges_subset.md.rsp
matrixStats/inst/benchmarking/colRowMads_subset.md.rsp
matrixStats/inst/benchmarking/logSumExp_subset.md.rsp
matrixStats/inst/benchmarking/sumOver_subset.md.rsp
matrixStats/inst/benchmarking/colRowCumsums_subset.md.rsp
matrixStats/inst/doc
matrixStats/inst/doc/matrixStats-methods.md.rsp
matrixStats/inst/doc/matrixStats-methods.html
matrixStats/tests
matrixStats/tests/rowOrderStats_subset.R
matrixStats/tests/x_OP_y_subset.R
matrixStats/tests/rowWeightedVars_subset.R
matrixStats/tests/signTabulate.R
matrixStats/tests/diff2.R
matrixStats/tests/rowCumMinMaxs_subset.R
matrixStats/tests/rowRanks.R
matrixStats/tests/rowCollapse.R
matrixStats/tests/count_subset.R
matrixStats/tests/weightedMean.R
matrixStats/tests/rowProds.R
matrixStats/tests/x_OP_y.R
matrixStats/tests/rowWeightedMeans_subset.R
matrixStats/tests/rowCollapse_subset.R
matrixStats/tests/validateIndices.R
matrixStats/tests/rowAvgsPerColSet_subset.R
matrixStats/tests/rowSds_subset.R
matrixStats/tests/rowDiffs_subset.R
matrixStats/tests/rowRanges.R
matrixStats/tests/allocArray.R
matrixStats/tests/count.R
matrixStats/tests/sumOver.R
matrixStats/tests/rowWeightedMeans.R
matrixStats/tests/rowCounts_subset.R
matrixStats/tests/rowCumMinMaxs.R
matrixStats/tests/meanOver.R
matrixStats/tests/meanOver_subset.R
matrixStats/tests/rowMedians_subset.R
matrixStats/tests/indexByRow.R
matrixStats/tests/binCounts.R
matrixStats/tests/varDiff_etal.R
matrixStats/tests/rowOrderStats.R
matrixStats/tests/rowMads_subset.R
matrixStats/tests/rowVarDiffs.R
matrixStats/tests/rowCumsums.R
matrixStats/tests/binMeans,binCounts_subset.R
matrixStats/tests/benchmark.R
matrixStats/tests/rowVarDiffs_var,sd_subset.R
matrixStats/tests/rowRanks_subset.R
matrixStats/tests/rowVars_subset.R
matrixStats/tests/zzz.package-unload.R
matrixStats/tests/rowAvgsPerColSet.R
matrixStats/tests/rowCumprods_subset.R
matrixStats/tests/rowRanges_subset.R
matrixStats/tests/rowWeightedVars.R
matrixStats/tests/rowIQRs_subset.R
matrixStats/tests/rowCumsums_subset.R
matrixStats/tests/rowTabulates_subset.R
matrixStats/tests/allocMatrix.R
matrixStats/tests/signTabulate_subset.R
matrixStats/tests/anyMissing_subset.R
matrixStats/tests/rowLogSumExps_subset.R
matrixStats/tests/rowWeightedMedians.R
matrixStats/tests/rowMedians.R
matrixStats/tests/rowLogSumExps.R
matrixStats/tests/rowVars.R
matrixStats/tests/product.R
matrixStats/tests/binMeans,binCounts.R
matrixStats/tests/allocVector.R
matrixStats/tests/weightedMedian.R
matrixStats/tests/sumOver_subset.R
matrixStats/tests/rowMads.R
matrixStats/tests/rowQuantiles_subset.R
matrixStats/tests/rowCumprods.R
matrixStats/tests/rowAllAnys_subset.R
matrixStats/tests/rowTabulates.R
matrixStats/tests/diff2_subset.R
matrixStats/tests/weightedMean_subset.R
matrixStats/tests/rowCounts.R
matrixStats/tests/psortKM.R
matrixStats/tests/binCounts_subset.R
matrixStats/tests/rowProds_subset.R
matrixStats/tests/rowDiffs.R
matrixStats/tests/rowVarDiffs_mad,iqr_subset.R
matrixStats/tests/logSumExp.R
matrixStats/tests/logSumExp_subset.R
matrixStats/tests/rowWeightedMedians_subset.R
matrixStats/tests/weightedMedian_subset.R
matrixStats/tests/weightedVar.R
matrixStats/tests/varDiff_etal_subset.R
matrixStats/tests/product_subset.R
matrixStats/tests/weightedVar_etal_subset.R
matrixStats/tests/rowSds.R
matrixStats/tests/anyMissing.R
matrixStats/tests/weightedVar_etal.R
matrixStats/tests/utils
matrixStats/tests/utils/validateIndicesFramework.R
matrixStats/tests/rowIQRs.R
matrixStats/tests/rowAllAnys.R
matrixStats/tests/rowQuantiles.R
matrixStats/src
matrixStats/src/validateIndices_TYPE-template.h
matrixStats/src/productExpSumLog.c
matrixStats/src/weightedMean.c
matrixStats/src/rowCumprods_TYPE-template.h
matrixStats/src/x_OP_y.c
matrixStats/src/rowOrderStats.c
matrixStats/src/binMeans.c
matrixStats/src/sumOver.c
matrixStats/src/allocMatrix2.c
matrixStats/src/rowDiffs.c
matrixStats/src/rowVars_TYPE-template.h
matrixStats/src/rowVars.c
matrixStats/src/psortKM.c
matrixStats/src/validateIndices.c
matrixStats/src/templates-gen-matrix-vector.h
matrixStats/src/rowMedians.c
matrixStats/src/rowLogSumExp.c
matrixStats/src/colCounts.c
matrixStats/src/rowLogSumExp_TYPE-template.h
matrixStats/src/rowMedians_TYPE-template.h
matrixStats/src/rowDiffs_TYPE-template.h
matrixStats/src/indexByRow.c
matrixStats/src/rowCounts.c
matrixStats/src/templates-types_undef.h
matrixStats/src/templates-types.h
matrixStats/src/rowMads_TYPE-template.h
matrixStats/src/productExpSumLog_TYPE-template.h
matrixStats/src/anyMissing.c
matrixStats/src/macros.h
matrixStats/src/binCounts-BINBY-template.h
matrixStats/src/utils.h
matrixStats/src/colOrderStats.c
matrixStats/src/templates-gen-vector.h
matrixStats/src/colRanges.c
matrixStats/src/signTabulate_TYPE-template.h
matrixStats/src/colOrderStats_TYPE-template.h
matrixStats/src/signTabulate.c
matrixStats/src/binCounts.c
matrixStats/src/rowCumprods.c
matrixStats/src/rowRanges_TYPE-template.h
matrixStats/src/diff2.c
matrixStats/src/logSumExp_TYPE-template.h
matrixStats/src/binMeans-BINBY-template.h
matrixStats/src/types.h
matrixStats/src/weightedMedian_TYPE-template.h
matrixStats/src/colRanges_TYPE-template.h
matrixStats/src/anyMissing_TYPE-template.h
matrixStats/src/rowRanksWithTies.c
matrixStats/src/rowRanges.c
matrixStats/src/meanOver.c
matrixStats/src/rowCumsums.c
matrixStats/src/rowOrderStats_TYPE-template.h
matrixStats/src/rowCumsums_TYPE-template.h
matrixStats/src/logSumExp.c
matrixStats/src/colCounts_TYPE-template.h
matrixStats/src/rowCumMinMaxs_TYPE-template.h
matrixStats/src/weightedMedian.c
matrixStats/src/weightedMean_TYPE-template.h
matrixStats/src/rowCounts_TYPE-template.h
matrixStats/src/meanOver_TYPE-template.h
matrixStats/src/init.c
matrixStats/src/sumOver_TYPE-template.h
matrixStats/src/rowRanksWithTies_TYPE_TIES-template.h
matrixStats/src/diff2_TYPE-template.h
matrixStats/src/rowMads.c
matrixStats/src/templates-gen-matrix.h
matrixStats/src/rowCumMinMaxs.c
matrixStats/src/api.h
matrixStats/src/x_OP_y_TYPE-template.h
matrixStats/NAMESPACE
matrixStats/NEWS
matrixStats/R
matrixStats/R/signTabulate.R
matrixStats/R/pkgStartupMessage.R
matrixStats/R/diff2.R
matrixStats/R/rowRanks.R
matrixStats/R/rowCollapse.R
matrixStats/R/weightedMean.R
matrixStats/R/rowProds.R
matrixStats/R/x_OP_y.R
matrixStats/R/validateIndices.R
matrixStats/R/rowRanges.R
matrixStats/R/sumOver.R
matrixStats/R/rowWeightedMeans.R
matrixStats/R/meanOver.R
matrixStats/R/indexByRow.R
matrixStats/R/binCounts.R
matrixStats/R/rowOrderStats.R
matrixStats/R/rowCumsums.R
matrixStats/R/benchmark.R
matrixStats/R/rowAvgsPerColSet.R
matrixStats/R/allocMatrix.R
matrixStats/R/rowWeightedMedians.R
matrixStats/R/rowMedians.R
matrixStats/R/rowLogSumExps.R
matrixStats/R/rowVars.R
matrixStats/R/product.R
matrixStats/R/weightedMedian.R
matrixStats/R/rowMads.R
matrixStats/R/varDiff.R
matrixStats/R/rowTabulates.R
matrixStats/R/weightedMad.R
matrixStats/R/rowCounts.R
matrixStats/R/psortKM.R
matrixStats/R/rowDiffs.R
matrixStats/R/logSumExp.R
matrixStats/R/binMeans.R
matrixStats/R/999.package.R
matrixStats/R/weightedVar.R
matrixStats/R/rowSds.R
matrixStats/R/zzz.R
matrixStats/R/anyMissing.R
matrixStats/R/rowIQRs.R
matrixStats/R/rowQuantiles.R
matrixStats/vignettes
matrixStats/vignettes/matrixStats-methods.md.rsp
matrixStats/MD5
matrixStats/build
matrixStats/build/vignette.rds
matrixStats/DESCRIPTION
matrixStats/man
matrixStats/man/rowOrderStats.Rd
matrixStats/man/rowWeightedMedians.Rd
matrixStats/man/weightedMedian.Rd
matrixStats/man/rowCollapse.Rd
matrixStats/man/xUNDERSCOREOPUNDERSCOREy.Rd
matrixStats/man/binCounts.Rd
matrixStats/man/rowProds.Rd
matrixStats/man/binMeans.Rd
matrixStats/man/anyMissing.Rd
matrixStats/man/logSumExp.Rd
matrixStats/man/varDiff.Rd
matrixStats/man/weightedVar.Rd
matrixStats/man/rowDiffs.Rd
matrixStats/man/diff2.Rd
matrixStats/man/validateIndices.Rd
matrixStats/man/rowMedians.Rd
matrixStats/man/meanOver.Rd
matrixStats/man/weightedMean.Rd
matrixStats/man/rowQuantiles.Rd
matrixStats/man/allocMatrix.Rd
matrixStats/man/rowTabulates.Rd
matrixStats/man/rowVars.Rd
matrixStats/man/rowWeightedMeans.Rd
matrixStats/man/signTabulate.Rd
matrixStats/man/rowSds.Rd
matrixStats/man/rowAvgsPerColSet.Rd
matrixStats/man/rowCumsums.Rd
matrixStats/man/rowRanges.Rd
matrixStats/man/indexByRow.Rd
matrixStats/man/rowCounts.Rd
matrixStats/man/matrixStats-package.Rd
matrixStats/man/sumOver.Rd
matrixStats/man/weightedMad.Rd
matrixStats/man/rowRanks.Rd
matrixStats/man/rowIQRs.Rd
matrixStats/man/rowLogSumExps.Rd