Skip to content

primes

1.6.1Package record

Fast Functions for Prime Numbers

3packages depend
16.1Kdownloads / year
90.1%test coverage
13/13flavors OK

Overview

About

Fast functions for dealing with prime numbers, such as testing whether a number is prime and generating a sequence prime numbers. Additional functions include finding prime factors and Ruth-Aaron pairs, finding next and previous prime numbers in the series, finding or estimating the nth prime, estimating the number of primes less than or equal to an arbitrary number, computing primorials, prime k-tuples (e.g., twin primes), finding the greatest common divisor and smallest (least) common multiple, testing whether two numbers are coprime, and computing Euler's totient function. Most functions are vectorized for speed and convenience.

Install

Health

CRAN checks
13OK
Slowest check: 3.1 min · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-04-22
  • ERROR13 OK, 1 ERROR2026-04-18
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.6.1
READMEYes · 174 wordsVignettesNoNEWSNoCitation fileNo
Help pages
12
Examples that run
100%8 run in a plain check
Exported functions with examples
73%
Documented parameters
91%
Return-value docs
91%
Help pages citing references
17%

Downloads

16.1K
CRAN downloads in the past year
Rank #2,998 · ~44/day · ~1.3K/mo
Daily download trend is not available in this view yet.
1.4K30 days
4.5K90 days
16.1K1 year
Compare downloads with other packages →
Also on395 r2u8 autocran99 c2d4u

Repository

10Stars
2Forks
1Open issues
1Open PRs
0Releases
88Commits
4Commit identities
88 commits · Last activity 2024-01-16 · 0% stars, 30d · The default branch showed an older version (1.6.0) than CRAN on 2026-10-11
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
20
Median days to close, 50 most recently updated closed PRs
6

Stars over time

2024-12-18 · 102026-07-07 · 10
PracticesBeta

9 development-tooling and community-health practices detected across 7 families in the upstream repository

Checks run against github.com/ironholds/primes on 2026-10-11.

Continuous integration (3)
GitHub ActionsTravis CI (config file)AppVeyor
Governance and community (1)
Code of conduct
Docs source (1)
pkgdown
Reproducibility and dev environment (1)
data-raw/
Show all practicesHide 3 practices
CRAN release process (1)
cran-comments.md
Lint, format, editor (1)
RStudio project
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
3 external dependencies (excludes base and recommended)

Installing primes adds 1 package (1 with compiled code, 1.8 MB of source tarballs). Heaviest: Rcpp 1.8 MB.

Depends (1)
R >= 4.0
Imports (1)
LinkingTo (1)
Suggests (1)
Enhances (0)
none
Reverse dependencies
3direct
0indirect
Imports 3
Depends, Imports or LinkingTo, most downloaded first

Datasets

People & History

People (2)
Author, Maintainer since 1.6.1 (2025) · added in 0.2.0
Author · added in 0.2.0

Previously maintained by Os Keyes (0.1.0 to 1.6.0).

Listed in earlier versions (1)
no longer listed · 0.1.0
Releases (10)

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
  • 1.6.1Latest
    record
    2025-02-04 · current release · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 1.6.0
    record
    2024-01-09 · diff ↗
  • 1.5.2
    record
    2023-12-19 · diff ↗
  • unarchivedReturned to CRAN
    2023-11-08
  • 1.5.1
    record
    2023-11-08 · diff ↗
  • archivedRemoved from CRAN
    2023-11-06
    issues were not corrected despite reminders
  • 1.5.0
    record
    2023-10-08 · diff ↗ ·
    added 3 exports
    phi, prime_factors, ruth_aaron_pairs
  • R
    R 4.3.0 released · 2023-04-21
  • 1.4.0
    record
    2022-09-12 · diff ↗ ·
    removed 3 exports
    phi, prime_factors, ruth_aaron_pairs
    added 2 exports
    Rgcd, Rscm
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 1.1.0
    record
    2020-09-03 · diff ↗ ·
    added 4 exports
    coprime, gcd, phi, scm
  • 1.0.0
    record
    2020-07-29 · diff ↗ ·
    added 4 exports
    generate_n_primes, nth_prime, nth_prime_estimate, prime_count
Show 8 earlier eventsHide 8 earlier events
  • 0.2.0
    record
    2020-07-27 · diff ↗ ·
    added 12 exports
    cousin_primes, k_tuple, next_prime, prev_prime, prime_factors, primorial_n, primorial_p, ruth_aaron_pairs, sexy_prime_triplets, sexy_primes, third_cousin_primes, twin_primes
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
  • R
    R 3.4.0 released · 2017-04-21
  • R
    R 3.3.0 released · 2016-05-03
  • 0.1.0
    record
    2015-06-22
  • R
    R 3.2.0 released · 2015-04-16

Package metadata

First published
2015-06-22
Total releases
10 / 11 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.0
Bundled data
0.9 KB / 1 file
Download size
22 KB
Appears in task views

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("primes")
Egeler, P., & Keyes, O. (2025). primes: Fast Functions for Prime Numbers (Version 1.6.1) [Computer software]. https://doi.org/10.32614/CRAN.package.primes

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 primes version 1.6.1 [Data set]. HJJB, LLC. Data release v2026-10-18. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-18, 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