{"id":19266548,"url":"https://github.com/henrikbengtsson/matrixstats","last_synced_at":"2025-05-14T22:08:27.120Z","repository":{"id":17893907,"uuid":"20844530","full_name":"HenrikBengtsson/matrixStats","owner":"HenrikBengtsson","description":"R package: Methods that Apply to Rows and Columns of Matrices (and to Vectors) ","archived":false,"fork":false,"pushed_at":"2025-01-07T21:00:17.000Z","size":6658,"stargazers_count":208,"open_issues_count":55,"forks_count":35,"subscribers_count":23,"default_branch":"develop","last_synced_at":"2025-05-14T22:08:21.421Z","etag":null,"topics":["cran","matrix","package","performance","r","vector"],"latest_commit_sha":null,"homepage":"https://cran.r-project.org/package=matrixStats","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HenrikBengtsson.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-06-14T23:59:10.000Z","updated_at":"2025-01-19T00:34:52.000Z","dependencies_parsed_at":"2023-01-13T19:33:14.856Z","dependency_job_id":"52e449d5-27c7-4dec-afca-fe5715cff863","html_url":"https://github.com/HenrikBengtsson/matrixStats","commit_stats":{"total_commits":1567,"total_committers":14,"mean_commits":"111.92857142857143","dds":"0.18506700701978307","last_synced_commit":"e173995f086eaf73c8c8c204bd6f043203bf1492"},"previous_names":[],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenrikBengtsson%2FmatrixStats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenrikBengtsson%2FmatrixStats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenrikBengtsson%2FmatrixStats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HenrikBengtsson%2FmatrixStats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HenrikBengtsson","download_url":"https://codeload.github.com/HenrikBengtsson/matrixStats/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254235700,"owners_count":22036964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cran","matrix","package","performance","r","vector"],"created_at":"2024-11-09T20:05:44.148Z","updated_at":"2025-05-14T22:08:21.962Z","avatar_url":"https://github.com/HenrikBengtsson.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\u003cdiv id=\"badges\"\u003e\u003c!-- pkgdown markup --\u003e\n\u003ca href=\"https://CRAN.R-project.org/web/checks/check_results_matrixStats.html\"\u003e\u003cimg border=\"0\" src=\"https://www.r-pkg.org/badges/version/matrixStats\" alt=\"CRAN check status\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/HenrikBengtsson/matrixStats/actions?query=workflow%3AR-CMD-check\"\u003e\u003cimg border=\"0\" src=\"https://github.com/HenrikBengtsson/matrixStats/actions/workflows/R-CMD-check.yaml/badge.svg?branch=develop\" alt=\"R CMD check status\"/\u003e\u003c/a\u003e    \u003ca href=\"https://ci.appveyor.com/project/HenrikBengtsson/matrixstats\"\u003e\u003cimg border=\"0\" src=\"https://ci.appveyor.com/api/projects/status/github/HenrikBengtsson/matrixStats?svg=true\" alt=\"Build status\"/\u003e\u003c/a\u003e \u003ca href=\"https://app.codecov.io/gh/HenrikBengtsson/matrixStats\"\u003e\u003cimg border=\"0\" src=\"https://codecov.io/gh/HenrikBengtsson/matrixStats/branch/develop/graph/badge.svg\" alt=\"Coverage Status\"/\u003e\u003c/a\u003e \u003ca href=\"https://github.com/rstats-gsoc/gsoc2015/wiki/table-of-proposed-coding-projects\"\u003e\u003cimg border=\"0\" src=\"https://img.shields.io/badge/GSoC-2015-blue\" alt=\"A Google Summer of Code 2015 project\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/rstats-gsoc/gsoc2021/wiki/table-of-proposed-coding-projects\"\u003e\u003cimg border=\"0\" src=\"https://img.shields.io/badge/GSoC-2021-blue\" alt=\"A Google Summer of Code 2021 project\"/\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n# matrixStats: Functions that Apply to Rows and Columns of Matrices (and to Vectors) \n\n## Introduction\n\nThe matrixStats package provides highly optimized functions for\ncomputing common summaries over rows and columns of matrices,\ne.g. `rowQuantiles()`. There are also functions that operate on\nvectors, e.g. `logSumExp()`. Their implementations strive to minimize\nboth memory usage and processing time. They are often remarkably\nfaster compared to good old `apply()` solutions. The calculations are\nmostly implemented in C, which allow us to optimize beyond what is\npossible to do in plain R. The package installs out-of-the-box on all\ncommon operating systems, including Linux, macOS and Windows.\n\n## Example\n\nWith a matrix\n\n```r\n\u003e x \u003c- matrix(rnorm(20 * 500), nrow = 20, ncol = 500)\n```\n\nit is [many times faster] to calculate medians column by column using\n\n```r\n\u003e mu \u003c- matrixStats::colMedians(x)\n```\n\nthan using\n\n```r\n\u003e mu \u003c- apply(x, MARGIN = 2, FUN = median)\n```\n\nMoreover, if performing calculations on a subset of rows and/or\ncolumns, using\n\n```r\n\u003e mu \u003c- colMedians(x, rows = 33:158, cols = 1001:3000)\n```\n\nis much faster and more memory efficient than\n\n```r\n\u003e mu \u003c- apply(x[33:158, 1001:3000], MARGIN = 2, FUN = median)\n```\n\n\n## Benchmarks\nFor formal benchmarking of matrixStats functions relative to\nalternatives, see the [Benchmark reports].\n\n\n## Design goals \n\nThe objectives of the **matrixStats** package is to perform operations\non matrices (i) as faster as possible, while (ii) not using\nunnecessary amounts of memory.  These objectives drive the design,\nincluding the choice of the different defaults.\n\n\n[many times faster]: https://www.jottr.org/2015/01/matrixStats-0.13.1.html\n[Benchmark reports]: https://github.com/HenrikBengtsson/matrixStats/wiki/Benchmark-reports\n\n## Installation\nR package matrixStats is available on [CRAN](https://cran.r-project.org/package=matrixStats) and can be installed in R as:\n```r\ninstall.packages(\"matrixStats\")\n```\n\n\n### Pre-release version\n\nTo install the pre-release version that is available in Git branch `develop` on GitHub, use:\n```r\nremotes::install_github(\"HenrikBengtsson/matrixStats\", ref=\"develop\")\n```\nThis will install the package from source.  Because of this and because this package also compiles native code, Windows users need to have [Rtools](https://cran.r-project.org/bin/windows/Rtools/) installed and macOS users need to have [Xcode](https://developer.apple.com/xcode/) installed.\n\n\n\u003c!-- pkgdown-drop-below --\u003e\n\n\n## Contributing\n\nTo contribute to this package, please see [CONTRIBUTING.md](CONTRIBUTING.md).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenrikbengtsson%2Fmatrixstats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenrikbengtsson%2Fmatrixstats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenrikbengtsson%2Fmatrixstats/lists"}