Hi.
I'm now having a difficulty with ggsurvplot() function.
All I want is just adding a two-line text on the graph.
However, since those 'gg-'things would not accept '+' symbol,
annotation() never works.
Of course, grob(), text() also did not work.
Now since this drives me over the wall, I need your help.
Thanks.
vedoa
2
Hi @timjun90 ,
something like this
# https://rpkgs.datanovia.com/survminer/
library("survminer")
require("survival")
fit <- survfit(Surv(time, status) ~ sex, data = lung)
timjun90 <- ggsurvplot(fit, data = lung)
timjun90$plot + geom_text(x = 500, y = 1, label="timjun90")
ggsurvplot is not a classical gg object but its subcomponent "plot" is. Hope it gives you some ideas.
system
Closed
3
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.