Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
1 answer
42 views

ggsurvplot Interprets Number of Observations as Levels in newdata Argument

I am experiencing an issue with the ggsurvplot function from the survminer package in R. When attempting to plot survival curves using ggsurvplot with the newdata argument, the function incorrectly ...
Yukiyaama's user avatar
1 vote
1 answer
43 views

ggsurvplot - adjust thickness of strata indicators

Is it possible to adjust the thickness of the strata indicators? The indicators in the legend are not as thick as in the risk.table. library(survminer) library(survival) fit <- survfit(Surv(time, ...
geek45's user avatar
  • 689
0 votes
1 answer
28 views

ggsurvplot - risk table fontsize

How to adjust the fontsize of the risk.table? I want the fontsize of the numbers at risk to be 20. Not the title of the risk.table. library(survminer) library(survival) data(lung) fit <- survfit(...
geek45's user avatar
  • 689
0 votes
1 answer
63 views

ggsurvplot not displaying combined survival curve with add.all = TRUE when Faceting

I am trying to create survival plots using the survminer package in R with data split by genetic mutations and include a summary line representing all individuals across facets. The survival analysis ...
Seymoo's user avatar
  • 189
2 votes
1 answer
43 views

patchwork - inset_element(): size and position

I have two plots. The first one (big) is the one which should function as the "background plot". The second (small) should be the inset. How can i adjust the size of the inset? How to ...
geek45's user avatar
  • 689
1 vote
1 answer
45 views

ggsurvplot - reposition strata color indicators of risk table

Is it possible to adjust the position of the yellow and blue strata indicators in the risk table when exporting to pdf format? This is my code: library(survminer) library(survival) library(patchwork) ...
geek45's user avatar
  • 689
0 votes
1 answer
42 views

How to get footnotes under the risk table (not in the middle of Kaplan Meier graph and risk table) in R?

I'm building a Kaplan Meier graph with a risk table and also like add a footnote. But, the footnote is coming in between the risk table and graph. I used survival, survminer and ggplot2 packages. I ...
kBhavana's user avatar
2 votes
2 answers
124 views

Reposition risk table labels in ggsurvplot

-- Possible SOLUTION as answer The labels are quite long resulting in shifting the No at risk to the right. Further, they are not left-aligned anymore. Thus, they are not in line with the x-axis of ...
geek45's user avatar
  • 689
1 vote
1 answer
39 views

How to plot a case-cohort object, a cch object

Do you know how to plot a case-cohort study where we perform a Cox regression to estimate HR of different covariates, in which I am specially interested in potential molecular biomarkers and its ...
Javier Hernando's user avatar
0 votes
1 answer
192 views

ggsurvplot risk table not drawing

This is not so much a question rather than a bug report which I have now raised on GitHub. I am posting it here because lots of people are using SO rather than GitHub to get help. And maybe someone of ...
tjebo's user avatar
  • 23.2k
0 votes
0 answers
53 views

Simulate survival study in R assuming a cure rate

I am looking to simulate a time to event study in R from the exponential distribution. I want to explore different scenarios to test the power of the log-rank test when cure exists. I want to look at ...
BobbyPP's user avatar
  • 25
0 votes
0 answers
72 views

Does ggsurvplot_combine() not support the calculation of p-values?

I would like to plot the survival of a single group against the survival of the entire population in a single Kaplan-Meier plot. Version 1: library(tidyverse) library(survival) library(survminer) df &...
Chris's user avatar
  • 409
0 votes
0 answers
44 views

Is there an equivalent of pairwise_survdiff( ) that I can use on data with competing risks?

I plotted cumulative incidence curves using this model fit: cuminc(Surv(time, outcome) ~ time_per, data) When I try plugging my data into pairwise_survdiff() pairwise_survdiff(Surv(time, outcome) ~ ...
Alex's user avatar
  • 73
0 votes
1 answer
41 views

Applying theme_tq removes subgroup colors from my table (survminer)

I am trying to make Kaplan Meier curves using the survminer package and then using ggplot2 to polish how it all looks. After I have created my survival object(g2) using the ggsurvplot function, I then ...
RKeln91's user avatar
0 votes
0 answers
59 views

Add shaded confidence interval to ggflexsurv plot

ggflexsurv from the package survminer seems to only support dashed confidence interval lines rather than shaded/filled. I've tried a few work arounds, such as this thread but to no avail. My last ...
Ashley's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
8