Fast Permutation Based Two Sample Tests
Overview
Fast randomization based two sample tests. Testing the hypothesis that two samples come from the same distribution using randomization to create p-values. Included tests are: Kolmogorov-Smirnov, Kuiper, Cramer-von Mises, Anderson-Darling, Wasserstein, and DTS. The default test (two_sample) is based on the DTS test statistic, as it is the most powerful, and thus most useful to most users. The DTS test statistic builds on the Wasserstein distance by using a weighting scheme like that of Anderson-Darling. See the companion paper at arXiv:2007.01360 or https://codowd.com/public/DTS.pdf for details of that test statistic, and non-standard uses of the package (parallel for big N, weighted observations, one sample tests, etc). We also include the permutation scheme to make test building simple for others.
This update contains two minor bugfixes.
1. Some of the unit tests use random numbers, one of those unit tests looking at
the function combine.twosamples failed to consider default (desired) behavior
for some possible values of those random numbers, and would occasionally fail.
This was a minor issue that would not negatively impact any users, _except_ that
it would occasionally cause a CRAN check to fail, which could cause trouble.
This update aims to fix the _test_, leaving all actual functionality unchanged,
so that there should not be further CRAN check failures from this issue.
2. Removed "C++11" from "System Requirements" -- as per current CRAN guidelines.
The presence of C++11 as a requirement caused a note for R-CMD-Check in R4.3.0 and up.
Currently, the lack of such a requirement does not affect compilation on any tested systems.
From NEWS.md in the release
Install
Health
NOTECRAN incoming feasibilityr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Maintainer: ‘Connor Dowd <cd@codowd.com>’ The Description field contains that of Anderson-Darling. See the companion paper at <arXiv:2007.01360> Please refer to arXiv e-prints via their arXiv DOI <doi:10.48550/arXiv.YYMM.NNNNN>.
- NOTE11 OK, 2 NOTENow
- NOTE12 OK, 2 NOTE2026-03-10
Documentation
- Help pages
- 10
- Examples that run
- 100%9 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 35
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
8 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/cdowd/twosamples on 2026-10-22.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-03-11
pkgdown site last built 2023-06-21, before release 2.0.1 (2023-06-23)
Dependencies
Installing twosamples adds 1 package (0 with compiled code, 298 KB of source tarballs). Heaviest: cpp11 298 KB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 2.0.1Latest
- RR 4.3.0 released · 2023-04-21
- 2.0.02022-07-12 · diff ↗ ·
removed 2 exports
order_stl, permutation_test_builderadded 1 export
combine.twosamples - 1.2.02022-06-07 · diff ↗
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 1.1.12020-07-19 · diff ↗
- 1.1.0
- RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
- 1.0.02018-12-03
- RR 3.5.0 released · 2018-04-23
Package metadata
- First published
- 2018-12-03
- Total releases
- 6 / 8 yrs
- License
- GPL (>= 2) OSI
- Download size
- 132 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("twosamples")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-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.