matrixStats
R package: Methods that Apply to Rows and Columns of Matrices (and to Vectors)
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.2%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
R package: Methods that Apply to Rows and Columns of Matrices (and to Vectors)
Basic Info
- Host: GitHub
- Owner: HenrikBengtsson
- Language: R
- Default Branch: develop
- Homepage: https://cran.r-project.org/package=matrixStats
- Size: 6.35 MB
Statistics
- Stars: 211
- Watchers: 23
- Forks: 35
- Open Issues: 57
- Releases: 0
Topics
Metadata Files
README.md
matrixStats: Functions that Apply to Rows and Columns of Matrices (and to Vectors)
Introduction
The matrixStats package provides highly optimized functions for
computing common summaries over rows and columns of matrices,
e.g. rowQuantiles(). There are also functions that operate on
vectors, e.g. logSumExp(). Their implementations strive to minimize
both memory usage and processing time. They are often remarkably
faster compared to good old apply() solutions. The calculations are
mostly implemented in C, which allow us to optimize beyond what is
possible to do in plain R. The package installs out-of-the-box on all
common operating systems, including Linux, macOS and Windows.
Example
With a matrix
```r
x <- matrix(rnorm(20 * 500), nrow = 20, ncol = 500) ```
it is many times faster to calculate medians column by column using
```r
mu <- matrixStats::colMedians(x) ```
than using
```r
mu <- apply(x, MARGIN = 2, FUN = median) ```
Moreover, if performing calculations on a subset of rows and/or columns, using
```r
mu <- colMedians(x, rows = 33:158, cols = 1001:3000) ```
is much faster and more memory efficient than
```r
mu <- apply(x[33:158, 1001:3000], MARGIN = 2, FUN = median) ```
Benchmarks
For formal benchmarking of matrixStats functions relative to alternatives, see the Benchmark reports.
Design goals
The objectives of the matrixStats package is to perform operations on matrices (i) as faster as possible, while (ii) not using unnecessary amounts of memory. These objectives drive the design, including the choice of the different defaults.
Installation
R package matrixStats is available on CRAN and can be installed in R as:
r
install.packages("matrixStats")
Pre-release version
To install the pre-release version that is available in Git branch develop on GitHub, use:
r
remotes::install_github("HenrikBengtsson/matrixStats", ref="develop")
This will install the package from source. Because of this and because this package also compiles native code, Windows users need to have Rtools installed and macOS users need to have Xcode installed.
Contributing
To contribute to this package, please see CONTRIBUTING.md.
Owner
- Name: Henrik Bengtsson
- Login: HenrikBengtsson
- Kind: user
- Company: UCSF
- Twitter: henrikbengtsson
- Repositories: 105
- Profile: https://github.com/HenrikBengtsson
Assoc Professor. R Foundation. R Consortium. Many R packages, e.g. future & matrixStats.
GitHub Events
Total
- Issues event: 4
- Watch event: 7
- Issue comment event: 33
- Pull request event: 4
- Fork event: 1
Last Year
- Issues event: 4
- Watch event: 7
- Issue comment event: 33
- Pull request event: 4
- Fork event: 1
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| hb | hb@a****g | 1,426 |
| Dongcan Jiang | d****g@g****m | 172 |
| Jakob Peder Pettersen | j****n@g****m | 39 |
| BHGC Website GHA Workflow Runner | b****h@b****g | 15 |
| AngelPn | a****a@g****m | 11 |
| const-ae | a****5@g****m | 7 |
| Brian Montgomery | b****y@y****m | 7 |
| Peter Hickey | p****y@g****m | 5 |
| HughParsonage | h****e@g****m | 4 |
| Jan Gleixner | j****r@g****m | 2 |
| Brennan Vincent | b****n@u****m | 2 |
| Michael Chirico | c****m@g****m | 1 |
| Hector Corrada Bravo | h****a@g****m | 1 |
| Dirk Eddelbuettel | e****d@d****g | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 131
- Total pull requests: 26
- Average time to close issues: 6 months
- Average time to close pull requests: 5 months
- Total issue authors: 47
- Total pull request authors: 7
- Average comments per issue: 3.18
- Average comments per pull request: 2.31
- Merged pull requests: 19
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 11
- Pull requests: 7
- Average time to close issues: 10 days
- Average time to close pull requests: about 8 hours
- Issue authors: 7
- Pull request authors: 3
- Average comments per issue: 2.09
- Average comments per pull request: 1.71
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- HenrikBengtsson (57)
- const-ae (9)
- hpages (6)
- PeteHaitch (4)
- Eluvias (3)
- yaccos (3)
- karoliskoncevicius (3)
- gdemin (2)
- mayer79 (2)
- arrayn (2)
- kasperdanielhansen (1)
- GabrielHoffman (1)
- alyst (1)
- Henrik-P (1)
- TimTaylor (1)
Pull Request Authors
- yaccos (18)
- const-ae (5)
- bkmontgom (4)
- MichaelChirico (2)
- HughParsonage (1)
- jan-glx (1)
- TimTaylor (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- cran 175,361 last-month
- Total docker downloads: 3,030,806
-
Total dependent packages: 332
(may contain duplicates) -
Total dependent repositories: 1,175
(may contain duplicates) - Total versions: 71
- Total maintainers: 1
cran.r-project.org: matrixStats
Functions that Apply to Rows and Columns of Matrices (and to Vectors)
- Homepage: https://github.com/HenrikBengtsson/matrixStats
- Documentation: http://cran.r-project.org/web/packages/matrixStats/matrixStats.pdf
- License: Artistic-2.0
-
Latest release: 1.5.0
published about 1 year ago
Rankings
Maintainers (1)
conda-forge.org: r-matrixstats
- Homepage: https://github.com/HenrikBengtsson/matrixStats
- License: Artistic-2.0
-
Latest release: 0.62.0
published almost 4 years ago
Rankings
Dependencies
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- actions/cache v2 composite
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- R >= 2.12.0 depends
- R.devices * suggests
- R.rsp * suggests
- base64enc * suggests
- ggplot2 * suggests
- knitr * suggests
- markdown * suggests
- microbenchmark * suggests