All Projects → HenrikBengtsson → Matrixstats

HenrikBengtsson / Matrixstats

R package: Methods that Apply to Rows and Columns of Matrices (and to Vectors)

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Matrixstats

Fmatvec
A fast vector/matrix library
Stars: ✭ 5 (-96.69%)
Mutual labels:  matrix, vector
Matrix Puppet Hangouts
Matrix bridge for Google Hangouts
Stars: ✭ 42 (-72.19%)
Mutual labels:  matrix, vector
Cglm
📽 Highly Optimized Graphics Math (glm) for C
Stars: ✭ 887 (+487.42%)
Mutual labels:  matrix, vector
Mathsharp
A vector and matrix library written in C# using hardware intrinsics
Stars: ✭ 616 (+307.95%)
Mutual labels:  matrix, vector
Algebra
means completeness and balancing, from the Arabic word الجبر
Stars: ✭ 92 (-39.07%)
Mutual labels:  matrix, vector
Vectorious
Linear algebra in TypeScript.
Stars: ✭ 616 (+307.95%)
Mutual labels:  matrix, vector
Sharpmath
A small .NET math library.
Stars: ✭ 36 (-76.16%)
Mutual labels:  matrix, vector
Armadillo Code
Armadillo: fast C++ library for linear algebra & scientific computing - http://arma.sourceforge.net
Stars: ✭ 388 (+156.95%)
Mutual labels:  matrix, vector
Changepoint
A place for the development version of the changepoint package on CRAN.
Stars: ✭ 90 (-40.4%)
Mutual labels:  package, cran
Linl
Linl Is Not Letter -- Markdown-based LaTeX Letter Template
Stars: ✭ 84 (-44.37%)
Mutual labels:  package, cran
Tensor Sensor
The goal of this library is to generate more helpful exception messages for numpy/pytorch matrix algebra expressions.
Stars: ✭ 532 (+252.32%)
Mutual labels:  matrix, vector
Numphp
Mathematical PHP library for scientific computing
Stars: ✭ 120 (-20.53%)
Mutual labels:  matrix, vector
Libxsmm
Library for specialized dense and sparse matrix operations, and deep learning primitives.
Stars: ✭ 518 (+243.05%)
Mutual labels:  matrix, vector
Cgmath
A linear algebra and mathematics library for computer graphics.
Stars: ✭ 773 (+411.92%)
Mutual labels:  matrix, vector
Joml
A Java math library for OpenGL rendering calculations
Stars: ✭ 479 (+217.22%)
Mutual labels:  matrix, vector
Rcppexamples
Examples of using Rcpp to interface R and C++
Stars: ✭ 33 (-78.15%)
Mutual labels:  package, cran
Graphene
A thin layer of graphic data types
Stars: ✭ 268 (+77.48%)
Mutual labels:  matrix, vector
Pyrr
3D mathematical functions using NumPy
Stars: ✭ 282 (+86.75%)
Mutual labels:  matrix, vector
Pkgsearch
Search R packages on CRAN
Stars: ✭ 73 (-51.66%)
Mutual labels:  package, cran
Lacaml
OCaml bindings for BLAS/LAPACK (high-performance linear algebra Fortran libraries)
Stars: ✭ 101 (-33.11%)
Mutual labels:  matrix, vector

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

Google Summer of Code (GSoC) 2021

If you are a student and interested in working on this project, please consider applying to work on it via GSoC 2021. Google Summer of Code is an initiative to support students to learn about and contribute to open-source software projects, while getting payed. The R community has been mentoring many GSoC projects over the years. For more details, please see the GSoC 2021 proposal 'matrixStats: Consistent Support for Name Attributes'. The deadline for student applications is on April 13, 2021 with a soft deadline the week before.


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

> x <- matrix(rnorm(20 * 500), nrow = 20, ncol = 500)

it is many times faster to calculate medians column by column using

> mu <- matrixStats::colMedians(x)

than using

> mu <- apply(x, MARGIN = 2, FUN = median)

Moreover, if performing calculations on a subset of rows and/or columns, using

> mu <- colMedians(x, rows = 33:158, cols = 1001:3000)

is much faster and more memory efficient than

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

Installation

R package matrixStats is available on CRAN and can be installed in R as:

install.packages("matrixStats")

Pre-release version

To install the pre-release version that is available in Git branch develop on GitHub, use:

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.

Software status

Resource CRAN GitHub Actions Travis CI AppVeyor CI
Platforms: Multiple Multiple Linux & macOS Windows
R CMD check CRAN version Build status Build status Build status
Test coverage Coverage Status
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].