Skip to content

castgen

1.0.2

Estimate Sample Size for Population Genomic Studies

0packages depend
2.4Kdownloads / year
84.5%test coverage
13/13checks pass

Overview

About
Maintained by Alexander M. SandercockFirst published 2025-04-021 releasesCRAN page ↗GitHub ↗

Estimate sample sizes needed to capture target levels of genetic diversity from a population (multivariate allele frequencies) for applications like germplasm conservation and breeding efforts. Compares bootstrap samples to a full population using linear regression, employing the R-squared value to represent the proportion of diversity captured. Iteratively increases sample size until a user-defined target R-squared is met. Offers a parallelized R implementation of a previously developed 'python' method. All ploidy levels are supported. For more details, see Sandercock et al. (2024) doi:10.1073/pnas.2403505121.

Install

Health

CRAN checks
13OK
Slowest check: 2.5 min · r-devel-linux-x86_64-fedora-clang
Code health
Yes
Tests · ratio 0.40
84.5%
Coverage · measured lines
100%
Documentation · exports
8
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-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 175 wordsVignettesNopkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
100%
Return-value docs
100%
References docs
100%

Downloads

2.4K
CRAN downloads in the past year
Rank #16,632 · ~7/day · ~199/mo
Daily download trend is not available in this view yet.
18330 days
63090 days
2.4K1 year
Compare downloads with other packages →
Also on114 r2u

Repository

Repository
1Stars
0Forks
0Open issues
0Open PRs
2Releases
25Commits
1Contributors
breedingconservationcran-rgenomics
License Apache-2.0 · 25 commits · Last activity 2025-04-02

Stars over time

2024-09-10 · 12026-07-07 · 1

Repository practices

Upstream repositoryBeta

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

Checks run against github.com/alex-sandercock/castgen on 2026-08-03.

Continuous integration (1)
GitHub Actions
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Lint, format, editor (2)
VS CodeRStudio project
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
6 external dependencies (excludes base and recommended)
Depends (0)
none
LinkingTo (0)
none
Suggests (1)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Code & Tests

People & History

People (1)
Maintainer (1)
Author, Maintainer
Authors (1)
Author, Maintainer
Package Timeline

1 release. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • 1.0.2Latest
    2026-03-10 · current release
  • R
    R 4.5.0 released · 2025-04-11

Package metadata

First published
2025-04-02
Total releases
1 / 1 yrs
License
Apache License (>= 2)
Download size
8.1 KB
Installed size
not tracked yet
With dependencies
not tracked yet

Cite

Cite this package

Start here. This is the citation for the package itself.

citation("castgen")

CRAN DOI

https://doi.org/10.32614/CRAN.package.castgen

BibTeX, derived from DESCRIPTION

@Manual{castgen,
  title  = {castgen: Estimate Sample Size for Population Genomic Studies},
  author = {Sandercock, Alexander M.},
  year   = {2025},
  note   = {R package version 1.0.2},
  doi    = {10.32614/CRAN.package.castgen},
  url    = {https://CRAN.R-project.org/package=castgen}
}

Derived from the package DESCRIPTION, not from a citation file the authors wrote. If they publish one later, prefer it.

This is the citation for the package. It is not a citation for the R Observatory.

Cite this page

Use this when the claim is about a measurement on this page.

BibTeX

@misc{robservatorycastgen,
  author    = {Balamuta, James Joseph},
  title     = {{R} {Observatory}: Metrics for {castgen} version 1.0.2},
  year      = {2026},
  publisher = {HJJB, LLC},
  url       = {https://r-observatory.thecoatlessprofessor.com/packages/castgen},
  note      = {Data set. Data release v2026-08-05}
}

APA

Balamuta, J. J. (2026). R Observatory: Metrics for castgen version 1.0.2 [Data set]. HJJB, LLC. Data release v2026-08-05. https://r-observatory.thecoatlessprofessor.com/packages/castgen

RIS

TY  - DATA
AU  - Balamuta, James Joseph
TI  - R Observatory: Metrics for castgen version 1.0.2
PY  - 2026
PB  - HJJB, LLC
N1  - Data release v2026-08-05
UR  - https://r-observatory.thecoatlessprofessor.com/packages/castgen
ER  - 

In prose

These package metrics were obtained from the R Observatory (Balamuta, 2026), data release v2026-08-05, https://r-observatory.thecoatlessprofessor.com/packages/castgen.

Bound to data release v2026-08-05, which is what makes the numbers on this page reproducible. See how to cite.

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