Skip to content

survival

3.8-12Package record

Survival Analysis

887packages dependsuggested by 309
2Mdownloads / year
67.4%test coverage
12/13flavors OK

Overview

About

Contains the core survival analysis routines, including definition of Surv objects, Kaplan-Meier and Aalen-Johansen (multi-state) curves, Cox models, and parametric accelerated failure time models.

Changes in 3.8-12
  • Update Surv2 so that a 0/1 or TRUE/FALSE status is not turned into a factor, in agreement with Surv
  • Add the clabel attribute to Surv and Surv2 objects, i.e., retain the label that was used for "censoring" when status is a factor. Begin to use that label in printout. Some code used (censor) and some (censored) as a default label for non-factor status, standardize on the first.
  • Minor error in survfit: if a subject had data of (0,10+), (10,24) the "censor" at time 10 really isn't a censoring, and 10 should not appear in the time component. But sometimes it did, depending on the path through the code. The curve was always correct, just with extra time points. Add tests/survfit3.R to C test for this.
  • Fix subscripting errors in yates() for a coxph model with an NA coefficient, and add a test case. Git pull request 343 found the error but the code change needed more documentation/comments. A similar length error is now fixed in survpenal.fit.

From inst/NEWS.Rd in the release

Install

Health

CRAN checks
1NOTE12OK
Check messages
NOTEcompiled coder-devel-windows-x86_64
Note: information on .o files for x64 is not available
File 'd:/Rcompile/CRANpkg/lib/4.7/survival/libs/x64/survival.dll':
  Found '_exit', possibly from '_exit' (C)
  Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)

Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor use Fortran I/O
nor system RNGs nor [v]sprintf. The detected symbols are linked into
the code but might come from libraries and not actually be called.

See 'Writing portable packages' in the 'Writing R Extensions' manual.

CRAN check page ↗

Slowest check: 15.8 min · r-oldrel-windows-x86_64
Status changes
  • NOTE12 OK, 1 NOTE2026-09-18
  • OK13 OK2026-09-17
  • NOTE12 OK, 1 NOTE2026-09-16
  • ERROR11 OK, 1 NOTE, 1 ERROR2026-09-11
  • NOTE12 OK, 1 NOTE2026-08-27
Show 6 earlier changesHide 6 earlier changes
  • OK13 OK2026-08-26
  • NOTE12 OK, 1 NOTE2026-07-11
  • OK13 OK2026-07-04
  • NOTE12 OK, 1 NOTE2026-07-03
  • OK12 OK2026-04-25
  • NOTE11 OK, 3 NOTE2026-03-10
Advisories

none known

Documentation

In release 3.8-12
README· In the repository, left out of the releaseVignettesYes · 16 · dynamicNEWSYes · mentions 3.8-12Citation fileYes · cites a publicationWebsitenot declared in DESCRIPTION
Help pages
135 (1 internal)
Examples that run
100%78 run in a plain check
Exported functions with examples
65%
Documented parameters
92%
Return-value docs
90%
Help pages citing references
32%

Downloads

2M
CRAN downloads in the past year
Rank #225 · ~5.4K/day · ~165.5K/mo
Daily download trend is not available in this view yet.
199.2K30 days
618K90 days
2M1 year
Compare downloads with other packages →
Also on119.2K r2u5.4K autocran688.7K conda_forge5.2K c2d4u

Repository

448Stars
112Forks
23Open issues
7Open PRs
0Releases
1,569Commits
13Commit identities
1,569 commits · Last activity 2026-10-14 · +0.4% stars, 30d · Default branch at 3.8-13, ahead of CRAN 3.8-12 (checked 2026-10-11)
Responsiveness
How these are sampled
PRs merged (all time)
26%
Median days to close, 50 most recently updated closed issues
8
Median days to close, 50 most recently updated closed PRs
6

Stars over time

2025-09-24 · 4172026-09-25 · 448
PracticesBeta

Checks run against github.com/therneau/survival on 2026-10-11.

No development-tooling practices detected in the upstream repository.

How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
0 external dependencies (excludes base and recommended)

Installing survival adds no packages beyond those that come with R.

Depends (1)
R >= 4.1.0
Imports (6)
graphicsMatrixmethodssplinesstatsutils
LinkingTo (0)
none
Suggests (0)
none
Enhances (0)
none

Datasets

People & History

People (4)
Author, Maintainer since 2.35-6 (2009)
Contributor · added in 3.1-11
Contributor · added in 3.1-11
Contributor, Translator
original S->R port and R maintainer until 2009

Previously maintained by Thomas Lumley (2.6 to 2.35-5).

Listed in earlier versions (2)
no longer listed · 2.6 to 2.36-14
Terry M
no longer listed · 2.37-2 to 3.8-12
Releases (111)

Pick two releases to compare their code metrics.

  • 3.8-12Latest
    record
    2026-09-09 · current release · diff ↗
  • 3.8-11
    record
    2026-08-21 · diff ↗
  • 3.8-9
    record
    2026-07-08 · diff ↗ ·
    removed 2 exports
    Surv2data, totimeline
  • R
    R 4.6.0 released · 2026-04-24
  • 3.8-6
    record
    2026-01-16 · diff ↗ ·
    added 3 exports
    lvcf, nostutter, survfit_confint
  • R
    R 4.5.0 released · 2025-04-11
  • 3.8-3
    record
    2024-12-17 · diff ↗ ·
    added 2 exports
    totimeline, fromtimeline
  • 3.7-0
    record
    2024-06-05 · diff ↗
  • 3.6-4
    record
    2024-04-24 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 3.5-8
    record
    2024-02-14 · diff ↗ ·
    removed 1 export
    survfitCI
  • 3.5-7
    record
    2023-08-14 · diff ↗ ·
    added 1 export
    brier
  • R
    R 4.3.0 released · 2023-04-21
  • 3.5-5
    record
    2023-03-12 · diff ↗
  • 3.5-3
    record
    2023-02-12 · diff ↗ ·
    removed 1 export
    labels.survreg
  • 3.5-0
    record
    2023-01-09 · diff ↗ ·
    added 1 export
    survcondense
Show 130 earlier eventsHide 130 earlier events

Package metadata

First published
2001-06-22
Total releases
111 / 25 yrs
License
LGPL (>= 2) OSI · relicensed from GPL (>= 2) in 2.37-2
Minimum R
≥ 4.1.0
Bundled data
2.3 MB / 17 files
Download size
8.1 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("survival")

The package provides a citation file that builds its entry when R runs it. Run citation() to see it.

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 survival version 3.8-12 [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