← Back to all sparks
S

survminer

ANALYTICS
Velocity0.0

Survival Analysis and Visualization

survminer is back after a five-year gap, and spending it cutting dependencies loose.

rsurvival-analysisggplot2dependency-reductionbiostatistics
Current state
survminer draws Kaplan-Meier curves and Cox diagnostics on top of ggplot2, and it sits under a large share of published survival figures. After a long dormancy it has shipped three releases since late 2024, and all of them are about staying compatible: with ggplot2 3.5, then 4.0, and now without survMisc, whose weighted log-rank tests are computed internally in base R as of 0.5.2. The plotting API itself has not changed.
Where it's heading
This is a revival by maintenance, not by feature work — the same pattern as its sibling packages from the same author. The dependency surface is being reduced rather than extended, and each release absorbs a breaking change from ggplot2 that would otherwise leave existing scripts producing errors or misaligned risk tables. Compatibility fixes now arrive within months of the upstream change rather than years.
Prediction
Continued ggplot2 4.x tracking is the most likely next release content, since 0.5.2 already carries fixes for 4.0.x aesthetics and the GeomConfint stairstep problem.

Recent moves

  1. 5mo ago

    survMisc dependency removed; weighted log-rank tests moved in-house

    Drops the at-risk survMisc dependency by reimplementing the weighted log-rank tests — Gehan-Breslow, Tarone-Ware, Peto-Peto, Fleming-Harrington and the trend test — in base R, with the notes stating existing method arguments behave identically. Also fixes GeomConfint under ggplot2 4.0.x and a surv_fit() failure using lists of formulas.

    View source ↗
  2. 11mo ago

    Risk-table misalignment fixed via dynamic panel detection

    Fixes chart and risk-table misalignment under ggplot2 3.5 by detecting panels dynamically instead of using hardcoded grob indices, plus several aesthetic and diagnostic fixes. The misalignment was visible in every plot with a risk table, so this is the release that made the package usable again on current ggplot2.

    View source ↗
  3. 1y ago

    ggcoxzph() sd scaling corrected; tidyverse deprecations cleared

    Raises the ggplot2 floor to 3.4.0, replaces deprecated tidyverse underscore functions and aes_string, and corrects the standard-deviation scaling factor in ggcoxzph(). That last fix changes what proportional-hazards diagnostic plots show.

    View source ↗
  4. 5y ago

    Gehan-Breslow p-value corrected for log.rank.weights = n

    Corrects the Gehan-Breslow p-value when log.rank.weights is set to n, and works around ggplot2 3.3.0 rejecting vectorized element_text colors by switching ggsurvtable() to ggtext::element_markdown(). A result-changing fix in the same weighted-test family that 0.5.2 would later reimplement.

    View source ↗
  5. 6y ago

    broom 0.7.0 compatibility fix in ggforest()

    A single maintenance change setting conf.int explicitly in ggforest()'s call to tidy.coxph for broom 0.7.0. Upstream churn absorption.

    View source ↗
  6. 6y ago

    surv_adjustedcurves() separates computation from plotting

    Splits surv_adjustedcurves() out of ggadjustedcurves() so adjusted survival curves can be computed without plotting them, making median survival and other statistics available from the same machinery. A rare separation of calculation from drawing in this package.

    View source ↗