Skip to content

collett

0.1.2Package record

Datasets from "Modelling Survival Data in Medical Research" by Collett

0packages depend
2.5Kdownloads / year
–test coverage
12/13flavors OK

Overview

About

Datasets for the book entitled "Modelling Survival Data in Medical Research" by Collett (2023) doi:10.1201/9781003282525. The datasets provide extensive examples of time-to-event data.

Install

Health

CRAN checks
1ERROR12OK
Check messages
ERRORexamplesr-devel-linux-x86_64-debian-gcc
Running examples in ‘collett-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: step_s
> ### Title: Utilities
> ### Aliases: step_s as.data.frame.survfit as.data.frame.summary.survfit
> ###   predict_coxph_tt predict_coxph_tv plot_coxph_functional
> 
> ### ** Examples
> 
>   step_s(data.frame(g=c(1,1), a=1:2, b=4:5), a, b)
  g a b
1 1 0 1
2 1 1 1
3 1 1 4
4 1 2 4
5 1 2 5
>   step_s(data.frame(g=c(2,2), a=3:4, b=6:7), a, b)
  g a b
1 2 0 1
2 2 3 1
3 2 3 6
4 2 4 6
5 2 4 7
>   step_s(data.frame(g=c(1,1,2,2), a=1:4, b=4:7), a, b, group=g)
   g a b
1  1 0 1
2  1 1 1
3  1 1 4
4  1 2 4
5  1 2 5
6  2 0 1
7  2 3 1
8  2 3 6
9  2 4 6
10 2 4 7
>   library(survival)

Attaching package: ‘survival’

The following objects are masked from ‘package:collett’:

    bladder, kidney, lung, myeloma, ovarian

>   library(tinyplot)
>   sfit1 = survfit(Surv(time,status)~rx, data=survival::colon,
+                   subset=etype==1)
>   with(as.d
...[truncated]...

+                  model="ns",times=times)
>  with(rbind(df1,df2),
+       plt(fitted ~ times | model, ymin=lower, ymax=upper, type="ribbon",
+           xlab="Time since diagnosis (days)",
+           ylab="Hazard ratio comparing treated with untreated"))
>  with(subset(breast_rfs,status==1), rug(time))
> library(survival)
> liver = transform(collett::liverbase, lbr=NULL)
> liver = tmerge(liver, liver, id=patient, status=event(time,status))
> liver = tmerge(liver,
+                rbind(with(collett::liverbase, data.frame(patient,tstart=0,lbr)),
+                      with(collett::lbrdata0, data.frame(patient,tstart=time,lbr))),
+            id=patient, lbr = tdc(tstart,lbr))
> fit3 = coxph(Surv(tstart,tstop,status)~lbr+treat,liver)
> predict_coxph_tv(fit3,data=subset(liver,patient %in% c(1,7)),
+                  id="patient")
Error in a$specials[[i]] : subscript out of bounds
Calls: predict_coxph_tv ... survfit.coxph -> model.matrix.coxph -> delete.response -> off
Execution halted

CRAN check page ↗

Slowest check: 1.7 min · r-devel-windows-x86_64
Status changes
  • ERROR12 OK, 1 ERROR2026-10-24
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-05-09
  • WARNING12 OK, 1 WARNING2026-05-08
Show 1 earlier changeHide 1 earlier change
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.1.2
READMEYes · 45 wordsVignettesNoNEWSNoCitation fileNoWebsitenot declared in DESCRIPTION
Help pages
37 (1 internal)includes a package overview page
Examples that run
80%4 run in a plain check · 1 hold no code
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
11%

Downloads

2.5K
CRAN downloads in the past year
Rank #16,984 · ~7/day · ~205/mo
Daily download trend is not available in this view yet.
28230 days
75190 days
2.5K1 year
Compare downloads with other packages →
Also on111 r2u6 autocran

Repository

2Stars
0Forks
0Open issues
0Open PRs
0Releases
15Commits
1Commit identities
15 commits · Last activity 2026-02-02 · Default branch at 0.1.3, ahead of CRAN 0.1.2 (checked 2026-10-22)
Responsiveness
not measured

Stars over time

2025-01-06 · 22026-07-07 · 2
PracticesBeta

1 development-tooling and community-health practice detected across 1 family in the upstream repository

Checks run against github.com/mclements/collett on 2026-10-22.

Reproducibility and dev environment (1)
Makefile
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
1 external dependency (excludes base and recommended)

Installing collett adds 1 package (0 with compiled code, 609 KB of source tarballs). Heaviest: tinyplot 609 KB.

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

Nothing depends on this yet.

Datasets

People & History

People (2)
Author, Maintainer since 0.1.0 (2025)
Contributor · added in 0.1.2
Releases (2)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 0.1.2Latest
    record
    2026-01-20 · current release · diff ↗ ·
    added 4 exports
    plot_coxph_functional, predict_coxph_tt, predict_coxph_tv, step_s
  • R
    R 4.5.0 released · 2025-04-11
  • 0.1.0
    record
    2025-01-09
  • R
    R 4.4.0 released · 2024-04-24

Package metadata

First published
2025-01-09
Total releases
2 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 3.5.0
Bundled data
94 KB / 34 files
Download size
296 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("collett")
Clements, M., & Chen, E. Y. (2026). collett: Datasets from "Modelling Survival Data in Medical Research" by Collett (Version 0.1.2) [Computer software]. https://doi.org/10.32614/CRAN.package.collett

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 collett version 0.1.2 [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