Skip to content

Add R packages overview to survival analysis chapter#349

Open
Copilot wants to merge 7 commits intomainfrom
copilot/add-overview-r-packages-survival-analysis
Open

Add R packages overview to survival analysis chapter#349
Copilot wants to merge 7 commits intomainfrom
copilot/add-overview-r-packages-survival-analysis

Conversation

Copy link
Contributor

Copilot AI commented Jan 27, 2026

  • Research R packages for survival analysis
  • Create comprehensive overview of R packages
  • Include packages mentioned in issue (survival, ggsurvfit, ggfortify, survminer)
  • Add other relevant CRAN packages
  • Include descriptions, features, and links
  • Integrate into intro-to-survival-analysis.qmd
  • Update WORDLIST with technical terms
  • Run linter (no new issues)
  • Run spellcheck (no errors)
  • Address all code review feedback:
    • Fixed CRAN URL inconsistency for ggsurvfit
    • Added hyperlinks to all modeling packages
    • Combined "Using the survival package in R" and "R Packages for Survival Analysis" sections
    • Clarified ggfortify reference to plotting example
    • Moved packages ecosystem content into separate subfile (_sec-surv-r-packages-ecosystem.qmd)
Original prompt

This section details on the original issue you should resolve

<issue_title>add an overview of R packages for survival analysis</issue_title>
<issue_description>- https://cran.r-project.org/web/packages/survival/index.html

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 27, 2026 21:31
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
… capitalization, use HTTPS

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copilot AI changed the title [WIP] Add overview of R packages for survival analysis Add R packages overview to survival analysis chapter Jan 27, 2026
Copilot AI requested a review from d-morrison January 27, 2026 21:34
@d-morrison d-morrison marked this pull request as ready for review January 28, 2026 01:32
Copilot AI review requested due to automatic review settings January 28, 2026 01:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds comprehensive documentation of the R survival analysis ecosystem to help readers navigate available tools in the survival analysis chapter.

Changes:

  • Adds new section documenting core, visualization, and specialized modeling packages for survival analysis
  • Provides package selection guidance organized by use case
  • Updates WORDLIST with relevant technical terms

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
_sec-surv-r-packages-overview.qmd New comprehensive overview of R packages for survival analysis, including core packages, visualization tools, and specialized modeling packages with usage guidance
intro-to-survival-analysis.qmd Integrates the new packages overview section after the "Using the survival package in R" section
inst/WORDLIST Adds technical terms used in the new content (package names, author names, and survival analysis terminology)

- Produces publication-ready legends without showing raw variable names
- All plot elements are native ggplot2 layers,
making customization straightforward
- Available on [CRAN](https://cran.r-project.org/package=ggsurvfit) and [GitHub](https://github.com/pharmaverse/ggsurvfit)
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CRAN link for ggsurvfit uses a different URL pattern than the other CRAN package links in this file. The survival, survminer, and ggfortify packages all use the pattern https://cran.r-project.org/web/packages/PACKAGE/index.html, but ggsurvfit uses https://cran.r-project.org/package=ggsurvfit. While both URL formats are valid CRAN URLs, using a consistent format throughout the document would improve maintainability. Consider changing this to https://cran.r-project.org/web/packages/ggsurvfit/index.html to match the other CRAN package links.

Suggested change
- Available on [CRAN](https://cran.r-project.org/package=ggsurvfit) and [GitHub](https://github.com/pharmaverse/ggsurvfit)
- Available on [CRAN](https://cran.r-project.org/web/packages/ggsurvfit/index.html) and [GitHub](https://github.com/pharmaverse/ggsurvfit)

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 2e5831b. Changed to use the consistent CRAN URL pattern matching other packages in the document.

Comment on lines +66 to +76
- **`flexsurv`**: Flexible parametric survival models with a wide range of distributions
- **`rms`** (Regression Modeling Strategies):
Advanced regression modeling including survival models with tools for model validation and calibration
- **`cmprsk`**: Competing risks regression using the Fine-Gray model
- **`mstate`**: Multi-state survival models for complex event histories
- **`timereg`**: Flexible regression models for survival data,
including additive hazards models
- **`frailtypack`**: Frailty models for clustered or recurrent event data
- **`riskRegression`**: Risk prediction models and performance evaluation
- **`pec`**: Prediction error curves for survival model validation
- **`prodlim`**: Fast estimation of survival models including competing risks
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The packages listed in the "Additional Modeling Packages" section lack hyperlinks to their documentation, which is inconsistent with the "Visualization Packages" section where all packages include links to their documentation. Adding CRAN links (and GitHub links where relevant) for these packages would make it easier for readers to find more information. For example, flexsurv, cmprsk, mstate, etc. should have links to their CRAN pages similar to how survival, ggsurvfit, survminer, and ggfortify are documented.

Suggested change
- **`flexsurv`**: Flexible parametric survival models with a wide range of distributions
- **`rms`** (Regression Modeling Strategies):
Advanced regression modeling including survival models with tools for model validation and calibration
- **`cmprsk`**: Competing risks regression using the Fine-Gray model
- **`mstate`**: Multi-state survival models for complex event histories
- **`timereg`**: Flexible regression models for survival data,
including additive hazards models
- **`frailtypack`**: Frailty models for clustered or recurrent event data
- **`riskRegression`**: Risk prediction models and performance evaluation
- **`pec`**: Prediction error curves for survival model validation
- **`prodlim`**: Fast estimation of survival models including competing risks
- **[`flexsurv`](https://cran.r-project.org/package=flexsurv)**: Flexible parametric survival models with a wide range of distributions
- **[`rms`](https://cran.r-project.org/package=rms)** (Regression Modeling Strategies):
Advanced regression modeling including survival models with tools for model validation and calibration
- **[`cmprsk`](https://cran.r-project.org/package=cmprsk)**: Competing risks regression using the Fine-Gray model
- **[`mstate`](https://cran.r-project.org/package=mstate)**: Multi-state survival models for complex event histories
- **[`timereg`](https://cran.r-project.org/package=timereg)**: Flexible regression models for survival data,
including additive hazards models
- **[`frailtypack`](https://cran.r-project.org/package=frailtypack)**: Frailty models for clustered or recurrent event data
- **[`riskRegression`](https://cran.r-project.org/package=riskRegression)**: Risk prediction models and performance evaluation
- **[`pec`](https://cran.r-project.org/package=pec)**: Prediction error curves for survival model validation
- **[`prodlim`](https://cran.r-project.org/package=prodlim)**: Fast estimation of survival models including competing risks

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 2e5831b. Added CRAN links to all packages in the Additional Modeling Packages section using the same URL pattern as the visualization packages.

@github-actions
Copy link

github-actions bot commented Jan 28, 2026

PR Preview Action v1.8.1-1-g6f3a89d

QR code for preview link

🚀 View preview at
https://d-morrison.github.io/rme/pr-preview/pr-349/

Built to branch gh-pages at 2026-02-02 04:54 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Comment on lines +46 to +53
@@ -47,6 +47,10 @@ The term *survival analysis* is a bit misleading. Survival outcomes can sometime

{{< include _sec-surv-R.qmd >}}

## R Packages for Survival Analysis

{{< include _sec-surv-r-packages-overview.qmd >}}

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should these two sections be combined?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Combined in commit 2e5831b. The packages overview is now integrated as a subsection of "Using the survival package in R" after the plotting examples, creating a more cohesive flow from basic usage to the broader ecosystem.

Copilot AI and others added 2 commits January 30, 2026 02:55
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copy link
Owner

@d-morrison d-morrison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move the new content into a sub file

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 2, 2026

move the new content into a sub file

Done in commit bec50a0. Moved the R packages ecosystem content into _sec-surv-r-packages-ecosystem.qmd and included it in _sec-surv-R.qmd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add an overview of R packages for survival analysis

3 participants