Skip to content

tanner

1.8.0Package record

Puberty Stage Line Diagrams and SDS for Tanner Pubertal Stages

0packages depend
527downloads / year
57.6%test coverage
13/13flavors OK

Overview

About

Plots Tanner pubertal stage measurements (genital, pubic hair, testicular volume, breast, menarche) against Dutch 1997 growth-study references as stage line diagrams, and converts observed stages to age-conditional standard deviation scores (SDS). Testicular volume can be entered as a raw orchidometer reading in ml. Implements the method of van Buuren and Ooms (2009) doi:10.1002/sim.3567.

Changes in 1.8.0

CRAN resubmission fixes

  • plotter(), plotterpro() and upload_tryCatch_pro() now return their HTML/JSON response as a string (invisibly) instead of only writing it via cat(). Under rApache, standard output is the actual HTTP response body, so the cat() calls remain and the deployment's behavior is unchanged; the return value simply gives a normal R caller (including R CMD check's console-output scanner) an object to work with instead of unsuppressable console text.
  • plotter() now saves and restores the global error option via an immediate on.exit() instead of leaving options(error = dump.frames) in effect for the rest of the R session after the function returns.

Bug fixes

Show all changes in 1.8.0Hide the rest of the changes in 1.8.0
  • calculate_sds(..., type = "tv") no longer has a discontinuity at Prader bead boundaries: a raw ml reading is now mapped onto a continuous bead-index scale before interpolating, so both the low and high percentiles in the mid-P formula move together and the SDS varies smoothly with ml instead of jumping right at each bead threshold (e.g. 11.99ml vs 12.00ml).
  • calculate_sds(..., type = "tv") now correctly returns NA for an NA age or stage, instead of a finite but wrong value. The continuous bead-index interpolation above used approx()'s default na.rm = TRUE, which silently drops NA (x, y) pairs from the interpolation table before interpolating -- so an NA age (which makes every real bead percentile NA) left only the two artificial boundary values (P(TV>=0)=1, P(TV>=Inf)=0) in the table, and interpolated between just those two instead of propagating the NA.
  • interpolate_trajectory()'s returned stage component is now the same length as x/y/patient. It was previously built from the cumulative length of the output-so-far across all segments instead of the current segment's own length, making it longer than the other three components whenever a patient had more than one stage segment.

Documentation

  • Documented that calculate_sds()'s return value is always the same length as age, and that stage must be the same length as age (not recycled) -- a length-1 stage, or any other length mismatch, is unsupported and can silently truncate, warn, produce NAs, or error depending on type.
  • Added vignettes/tanner.Rmd, covering a fuller plot_stadia() walkthrough across its type/plotline/colors/overlay arguments, how raw tv (ml) readings are handled differently by calculate_sds() (continuous interpolation) versus plot_stadia() (snap to the nearest Prader bead curve), and the mid-P value SDS methodology of van Buuren & Ooms (2009) -- including why it is a discrete/ordinal method distinct from LMS/BCCG continuous-measurement SDS (e.g. centile::y2z()). Originally written as a Quarto vignette (tanner.qmd, %\VignetteEngine{quarto::html}); converted to classic knitr::rmarkdown (VignetteBuilder: knitr) after CI revealed an unresolved upstream Windows-only bug in the Quarto vignette engine (see "Continuous integration" below) that would have blocked CRAN submission, since CRAN's own build machines check Windows.
  • Added a "Package structure" section to the README distinguishing the supported general-purpose library API (plot_stadia*, interpolate_trajectory, find_stage_segments, calculate_sds, tnologo) from the rApache webapp request handlers (plotter, plotterpro, upload_tryCatch_pro) kept only for the existing deployment. plotter(), plotterpro() and upload_tryCatch_pro() are now also grouped under a @family webapp-internals roxygen tag, so they cross-reference each other in ?tanner and on the pkgdown site.
  • Added a pkgdown site (_pkgdown.yml), with a reference index split into "Plotting & analysis", "Reference data", and "Webapp internals" sections, and URL/BugReports fields in DESCRIPTION.
  • Added full citations for van Buuren S (2014), "Growth charts of human development," *Statistical Methods in Medical Research*, 23(4), 346-368, in nl1997's source documentation.

Testing

  • Added testthat unit tests for calculate_sds(), interpolate_trajectory(), find_stage_segments(), and smoke tests for the plot_stadia* drawing functions (which draw to a graphics device and return invisible NULL, so are tested by asserting they run without error). Extracted the tv ml-to-nearest-bead snapping logic out of plot_stadia_data() into an internal snap_tv_to_nearest_bead() helper so it can be unit tested directly.

Internal refactoring

  • calculate_sds() and snap_tv_to_nearest_bead() each independently parsed the ml threshold from "T"-prefixed tv reference column names (e.g. "T12" -> 12); extracted the shared parsing step into an internal tv_ml_thresholds() helper. Pure refactor, no behavior change -- the bracket-and-interpolate vs. snap-to-nearest logic that follows at each call site is untouched.

Continuous integration

  • Added .github/workflows/R-CMD-check.yaml (a standard R CMD check matrix across macOS/Windows/Ubuntu) and .github/workflows/pkgdown.yaml (builds and deploys the pkgdown site to GitHub Pages on push to master). windows-latest was briefly excluded from the check matrix after CI revealed that the quarto::html vignette engine hits an unresolved upstream Windows-only bug during R CMD build (the Quarto subprocess can't see the temporary library R CMD build just installed the package into; r-lib/rcmdcheck#236); re-added once the vignette was converted to classic knitr::rmarkdown (see "Documentation" above), which doesn't hit this bug since it renders in-process rather than via an external Quarto subprocess.
  • _pkgdown.yml now sets template: bootstrap: 5 (Quarto-rendered articles require it; the default Bootstrap 3 made the pkgdown site build fail before it ever reached the deploy step) and llm-docs: false (pkgdown's llms.txt generation, not needed here and fragile against the runner's pandoc version).

Package loading

  • library(tanner) no longer creates a plotdumpdir directory (or writes to disk at all) as a side effect of loading the package. The directory is now created lazily, on the first actual write inside plotter()/plotterpro()/upload_tryCatch_pro(); plotdumpdir remains exported and mutable.
  • plotdumpdir now defaults to a "plotfiles" subdirectory of tempdir() instead of the hardcoded /tmp/plotfiles, and upload_tryCatch_pro()'s uploaded-file and .RData handoff files move there too (previously hardcoded to /tmp independently of plotdumpdir). This is a behavior change for the rApache deployment: tempdir() must resolve to a writable location that stays stable across the upload and plot requests for a given user session (true for a single long-running R process, which is how rApache normally hosts an R interpreter per worker). Unix-only /tmp was also a portability problem for R CMD check/CI on Windows and macOS runners, even though the webapp handlers themselves only ever ran on Linux.

Breaking changes

  • Renamed three exported functions to consistent snake_case, matching plot_stadia()'s existing naming style:
  • calculateSDS() -> calculate_sds()
  • findXY() -> interpolate_trajectory()
  • findSegments() -> find_stage_segments()

There are no backwards-compatible aliases for the old names; update any

code calling them directly.

  • Renamed the two bundled reference datasets, following the <population><year> naming convention used by the nlreferences and clopus packages:
  • pub.ref -> nl1997
  • pub.ref.lines -> nl1997_lines

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 2.0 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OKNow
  • OK7 OK2026-08-07
Advisories

none known

Documentation

In release 1.8.0
READMEYes · 973 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 1.8.0Citation fileNoWebsiteYes · pkgdown
Help pages
16 (2 internal)
Examples that run
100%2 run in a plain check
Exported functions with examples
17%
Documented parameters
95%
Return-value docs
92%
Help pages citing references
6%

Downloads

527
CRAN downloads in the past year
Rank #24,041 · ~1/day · ~44/mo
Daily download trend is not available in this view yet.
14730 days
52790 days
5271 year
Compare downloads with other packages →
Also on14 r2u1 autocran

Repository

0Stars
0Forks
0Open issues
0Open PRs
0Releases
Last activity 2026-07-28
Responsiveness
not measured
PracticesBeta

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

Checks run against github.com/growthcharts/tanner 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 (5)
README.qmdpkgdownQuarto project

GitHub Pages site last deployed 2026-07-28 · The repository has a site deploy workflow

pkgdown site last built 2026-07-28, before release 1.8.0 (2026-08-06)

Reproducibility and dev environment (1)
data-raw/
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Show all practicesHide 1 practice
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
4 external dependencies (excludes base and recommended)

Installing tanner adds 26 packages (14 with compiled code, 7.3 MB of source tarballs). Heaviest: vctrs 1.0 MB, rlang 766 KB, cli 629 KB.

Depends (1)
R >= 3.5.0
Imports (1)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (2)
Author, Maintainer since 1.8.0 (2026)
Releases (1)
  • 1.8.0Latest
    2026-08-06 · current release
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First published
2026-08-06
Total releases
1 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 3.5.0
Bundled data
16 KB / 2 files
Download size
736 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("tanner")
van Buuren, S., & Ooms, J. (2026). tanner: Puberty Stage Line Diagrams and SDS for Tanner Pubertal Stages (Version 1.8.0) [Computer software]. https://doi.org/10.32614/CRAN.package.tanner

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 tanner version 1.8.0 [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