Skip to content

twosamples

2.0.1Package record

Fast Permutation Based Two Sample Tests

4packages dependsuggested by 3
114Kdownloads / year
81.0%test coverage
11/13flavors OK

Overview

About

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.

Changes in 2.0.1

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

CRAN checks
2NOTE11OK
Check messages
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>.

CRAN check page ↗

Slowest check: 2.2 min · r-devel-windows-x86_64
Status changes
  • NOTE11 OK, 2 NOTENow
  • NOTE12 OK, 2 NOTE2026-03-10
Advisories

none known

Documentation

In release 2.0.1
READMEYes · 1,159 wordsVignettesNoNEWSYes · 100% structured · mentions 2.0.1Citation fileNoWebsiteYes · pkgdown
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

114K
CRAN downloads in the past year
Rank #1,237 · ~312/day · ~9.5K/mo
Daily download trend is not available in this view yet.
9.1K30 days
25.6K90 days
114K1 year
Compare downloads with other packages →
Also on1.4K r2u3 autocran3.2K conda_forge44 c2d4u

Repository

17Stars
2Forks
7Open issues
0Open PRs
6Releases
141Commits
2Commit identities
cranrdistance-metricecdf
141 commits · Last activity 2026-03-11
Responsiveness
How these are sampled
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

2025-02-26 · 172026-07-07 · 17
PracticesBeta

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.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (3)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-03-11

pkgdown site last built 2023-06-21, before release 2.0.1 (2023-06-23)

CRAN release process (2)
cran-comments.mdrevdep/
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
2 external dependencies (excludes base and recommended)

Installing twosamples adds 1 package (0 with compiled code, 298 KB of source tarballs). Heaviest: cpp11 298 KB.

Depends (0)
none
Imports (0)
none
LinkingTo (1)
Suggests (1)
Enhances (0)
none
Reverse dependencies
4direct
9indirect
Imports 4
Suggested by 3
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

People & History

People (1)
Author, Maintainer since 1.0.0 (2018)
Releases (6)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 2.0.1Latest
    record
    2023-06-23 · current release · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 2.0.0
    record
    2022-07-12 · diff ↗ ·
    removed 2 exports
    order_stl, permutation_test_builder
    added 1 export
    combine.twosamples
  • 1.2.0
    record
    2022-06-07 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 1.1.1
    record
    2020-07-19 · diff ↗
  • 1.1.0
    record
    2020-07-14 · diff ↗ ·
    removed 1 export
    order_cpp
    added 1 export
    order_stl
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • 1.0.0
    record
    2018-12-03
  • R
    R 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")
Dowd, C. (2023). twosamples: Fast Permutation Based Two Sample Tests (Version 2.0.1) [Computer software]. https://doi.org/10.32614/CRAN.package.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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for twosamples version 2.0.1 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy