Skip to content

primes

1.6.1

Fast Functions for Prime Numbers

2packages depend
17.9Kdownloads / year
90.1%test coverage
13/13checks pass

Overview

About
Maintained by Paul EgelerFirst published 2015-06-2210 releasesCRAN page ↗GitHub ↗

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.2 min · r-devel-windows-x86_64
Code health
Yes
Tests · ratio 0.43
90.1%
Coverage · measured lines
100%
Documentation · exports
1
Dependencies · direct
Check history
  • OK2026-08-05
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-08-01
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-04-22
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-04-18
    13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 174 wordsVignettesNopkgdown siteNoNEWSNoCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
91%
Return-value docs
91%
References docs
17%

Downloads

17.9K
CRAN downloads in the past year
Rank #3,390 · ~49/day · ~1.5K/mo
Daily download trend is not available in this view yet.
1.2K30 days
3K90 days
17.9K1 year
Compare downloads with other packages →
Also on429 r2u24 autocran50 c2d4u

Repository

Repository
10Stars
2Forks
1Open issues
1Open PRs
0Releases
88Commits
4Contributors
88 commits · Last activity 2024-01-16

Stars over time

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

Repository practices

Upstream repositoryBeta

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

Checks run against github.com/ironholds/primes on 2026-08-23.

Continuous integration (3)
GitHub ActionsTravis CIAppVeyor
Reproducibility and dev environment (1)
data-raw/
CRAN release process (1)
cran-comments.md
Lint, format, editor (1)
RStudio project
Show all practices
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
3 external dependencies (excludes base and recommended)
Depends (1)
R >= 4.0
Imports (1)
LinkingTo (1)
Suggests (1)
Enhances (0)
none
Reverse dependencies
2direct
0indirect

Code & Tests

Datasets

People & History

People (2)
Maintainer (1)
Author, Maintainer · added in 0.2.0
Authors (2)
Author, Maintainer · added in 0.2.0
Author · added in 0.2.0
Listed in earlier versions (1)
no longer listed · 0.1.0
Package Timeline

10 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 1.6.1Latest
    2025-02-04 · current release · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 1.6.0
    2024-01-09 · diff ↗
  • 1.5.2
    2023-12-19 · diff ↗
  • 1.5.1
    2023-11-08 · diff ↗
  • unarchivedReturned to CRAN
    2023-11-08
  • archivedRemoved from CRAN
    2023-11-06
    issues were not corrected despite reminders
  • 1.5.0
    2023-10-08 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 1.4.0
    2022-09-12 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 1.1.0
    2020-09-03 · diff ↗
  • 1.0.0
    2020-07-29 · diff ↗
Show 8 earlier events
  • 0.2.0
    2020-07-27 · diff ↗
  • 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
    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
Installed size
not tracked yet
With dependencies
not tracked yet
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 is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

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-08-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-08-25, 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