contsurvplot
An R-Package to Visualize the (Causal) Effect of a Continuous Variable on a Time-To-Event Outcome
Science Score: 39.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (20.6%) to scientific vocabulary
Keywords
Repository
An R-Package to Visualize the (Causal) Effect of a Continuous Variable on a Time-To-Event Outcome
Basic Info
- Host: GitHub
- Owner: RobinDenz1
- License: gpl-3.0
- Language: R
- Default Branch: main
- Homepage: https://robindenz1.github.io/contsurvplot/
- Size: 20.4 MB
Statistics
- Stars: 14
- Watchers: 1
- Forks: 1
- Open Issues: 2
- Releases: 4
Topics
Metadata Files
README.md
contsurvplot 
Author: Robin Denz
Description
contsurvplot is an R-Package which can be used to visualize the causal effect of a continuous variable on a time-to-event outcome.
It includes multiple different plot types, such as survival area plots, contour plots, heatmaps, survival quantile plots and more.
All of them can be adjusted for confounders and all of them have a lot of build in options to customize them according to the users needs.
Also, most of the plot functions are based on the ggplot2 package, allowing the user to use the standard ggplot2 syntax to customize the plots further.
Installation
The stable release version can be installed directly from CRAN using:
R
install.packages("contsurvplot")
Alternatively, the development version can be installed using the devtools R-Package:
```R library(devtools)
devtools::install_github("RobinDenz1/contsurvplot") ```
or the remotes R-Package:
```R library(remotes)
remotes::install_github("RobinDenz1/contsurvplot") ```
Bug Reports and Feature Requests
If you encounter any bugs or have any specific feature requests, please file an Issue.
Examples
Here are two quick examples using the colon dataset from the survival R-Package.
Suppose we want to visualize the effect of the number of lymph nodes with detectable cancer (column nodes) on the survival time.
A survival area plot can be produced using the following code:
```R library(contsurvplot) library(ggplot2) library(survival) library(riskRegression)
load colon data
data(cancer)
fit cox model, adjusting for age and sex
model <- coxph(Surv(time, status) ~ age + sex + nodes, data=colon, x=TRUE)
plot survival area
plotsurvarea(time="time", status="status", variable="nodes", data=colon, model=model)
```

Alternatively, we can plot a contour plot to visualize the effect:
R
plot_surv_contour(time="time",
status="status",
variable="nodes",
data=colon,
model=model)

Or we can use a simple plot of the median survival time as a function of nodes:
R
plot_surv_quantiles(time="time",
status="status",
variable="nodes",
data=colon,
model=model,
p=0.5)

More examples can be found in the documentation and the vignette.
Citation
The main paper associated with this R-Package is:
Robin Denz, Nina Timmesfeld (2023). Visualizing the (causal) effect of a continuous variable on a time-to-event outcome. Epidemiology. 34.5 doi:10.1097/EDE.0000000000001630
In addition, some relevant literature can be found in the documentation pages.
License
© 2022 Robin Denz
The contents of this repository are distributed under the GNU General Public License. You can find the full text of this License in this github repository. Alternatively, see http://www.gnu.org/licenses/.
Owner
- Name: Robin Denz
- Login: RobinDenz1
- Kind: user
- Repositories: 2
- Profile: https://github.com/RobinDenz1
I am a researcher at the Ruhr-University of Bochum in Germany and am currently enrolled as a PhD Student in "Epidemiology & Clinical Research".
CodeMeta (codemeta.json)
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"identifier": "contsurvplot",
"description": "Graphically display the (causal) effect of a continuous variable on a time-to-event outcome using multiple different types of plots based on g-computation. Those functions include, among others, survival area plots, survival contour plots, survival quantile plots and 3D surface plots. Due to the use of g-computation, all plot allow confounder-adjustment naturally. For details, see Robin Denz, Nina Timmesfeld (2023) <doi:10.1097/EDE.0000000000001630>.",
"name": "contsurvplot: Visualize the Effect of a Continuous Variable on a Time-to-Event Outcome",
"relatedLink": "https://robindenz1.github.io/contsurvplot/",
"codeRepository": "https://github.com/RobinDenz1/contsurvplot",
"issueTracker": "https://github.com/RobinDenz1/contsurvplot/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.2.2",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.5.0 (2025-04-11 ucrt)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"author": [
{
"@type": "Person",
"givenName": "Robin",
"familyName": "Denz",
"email": "robin.denz@rub.de"
}
],
"maintainer": [
{
"@type": "Person",
"givenName": "Robin",
"familyName": "Denz",
"email": "robin.denz@rub.de"
}
],
"softwareSuggestions": [
{
"@type": "SoftwareApplication",
"identifier": "survival",
"name": "survival",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=survival"
},
{
"@type": "SoftwareApplication",
"identifier": "pammtools",
"name": "pammtools",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=pammtools"
},
{
"@type": "SoftwareApplication",
"identifier": "gganimate",
"name": "gganimate",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=gganimate"
},
{
"@type": "SoftwareApplication",
"identifier": "transformr",
"name": "transformr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=transformr"
},
{
"@type": "SoftwareApplication",
"identifier": "plotly",
"name": "plotly",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=plotly"
},
{
"@type": "SoftwareApplication",
"identifier": "reshape2",
"name": "reshape2",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=reshape2"
},
{
"@type": "SoftwareApplication",
"identifier": "doParallel",
"name": "doParallel",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=doParallel"
},
{
"@type": "SoftwareApplication",
"identifier": "knitr",
"name": "knitr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=knitr"
},
{
"@type": "SoftwareApplication",
"identifier": "rmarkdown",
"name": "rmarkdown",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rmarkdown"
},
{
"@type": "SoftwareApplication",
"identifier": "testthat",
"name": "testthat",
"version": ">= 3.0.0",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=testthat"
},
{
"@type": "SoftwareApplication",
"identifier": "vdiffr",
"name": "vdiffr",
"version": ">= 1.0.0",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=vdiffr"
},
{
"@type": "SoftwareApplication",
"identifier": "covr",
"name": "covr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=covr"
}
],
"softwareRequirements": {
"1": {
"@type": "SoftwareApplication",
"identifier": "ggplot2",
"name": "ggplot2",
"version": ">= 3.4.0",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=ggplot2"
},
"2": {
"@type": "SoftwareApplication",
"identifier": "dplyr",
"name": "dplyr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=dplyr"
},
"3": {
"@type": "SoftwareApplication",
"identifier": "rlang",
"name": "rlang",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rlang"
},
"4": {
"@type": "SoftwareApplication",
"identifier": "riskRegression",
"name": "riskRegression",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=riskRegression"
},
"5": {
"@type": "SoftwareApplication",
"identifier": "foreach",
"name": "foreach",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=foreach"
},
"SystemRequirements": null
},
"fileSize": "15261.424KB",
"citation": [
{
"@type": "ScholarlyArticle",
"datePublished": "2023",
"author": [
{
"@type": "Person",
"givenName": "Robin",
"familyName": "Denz"
},
{
"@type": "Person",
"givenName": "Nina",
"familyName": "Timmesfeld"
}
],
"name": "Visualizing the (Causal) Effect of a Continuous Variable on a Time-To-Event Outcome",
"url": "https://doi.org/10.1097/EDE.0000000000001630",
"isPartOf": {
"@type": "PublicationIssue",
"issueNumber": "5",
"datePublished": "2023",
"isPartOf": {
"@type": [
"PublicationVolume",
"Periodical"
],
"volumeNumber": "34",
"name": "Epidemiology"
}
}
}
],
"releaseNotes": "https://github.com/RobinDenz1/contsurvplot/blob/master/NEWS.md",
"readme": "https://github.com/RobinDenz1/contsurvplot/blob/main/README.md",
"contIntegration": [
"https://github.com/RobinDenz1/contsurvplot/actions",
"https://app.codecov.io/gh/RobinDenz1/contsurvplot?branch=main"
],
"developmentStatus": "https://www.repostatus.org/#active",
"keywords": [
"causal-inference",
"continuous",
"g-computation",
"survival-analysis",
"visualization"
]
}
GitHub Events
Total
- Issues event: 11
- Watch event: 2
- Issue comment event: 7
- Push event: 4
Last Year
- Issues event: 11
- Watch event: 2
- Issue comment event: 7
- Push event: 4
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 12
- Total pull requests: 1
- Average time to close issues: 3 days
- Average time to close pull requests: 1 minute
- Total issue authors: 11
- Total pull request authors: 1
- Average comments per issue: 2.08
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 5
- Pull requests: 0
- Average time to close issues: 2 days
- Average time to close pull requests: N/A
- Issue authors: 4
- Pull request authors: 0
- Average comments per issue: 1.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- cemalley (2)
- ArighnoDas (1)
- fukuokaya (1)
- zjppdozen (1)
- lduverglas99 (1)
- DanChaltiel (1)
- katygard (1)
- Lassehhansen (1)
- dylanpieper (1)
- alockhar (1)
- rk13111 (1)
- EmmaInzani (1)
- iyannan18 (1)
Pull Request Authors
- aditya-88 (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 486 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 4
- Total maintainers: 1
cran.r-project.org: contsurvplot
Visualize the Effect of a Continuous Variable on a Time-to-Event Outcome
- Homepage: https://github.com/RobinDenz1/contsurvplot
- Documentation: http://cran.r-project.org/web/packages/contsurvplot/contsurvplot.pdf
- License: GPL (≥ 3)
-
Latest release: 0.2.2
published 9 months ago
Rankings
Maintainers (1)
Dependencies
- dplyr * imports
- foreach * imports
- ggplot2 >= 3.0.0 imports
- riskRegression * imports
- rlang * imports
- covr * suggests
- doParallel * suggests
- gganimate * suggests
- knitr * suggests
- pammtools * suggests
- plotly * suggests
- reshape2 * suggests
- rmarkdown * suggests
- survival * suggests
- testthat >= 3.0.0 suggests
- transformr * suggests
- vdiffr >= 1.0.0 suggests
- actions/checkout v3 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- actions/checkout v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite