-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changing proportion picture to risk table #33
Comments
Hi, I think that you don't have the latest version of survminer installed on your computer.
remove.packages("survminer")
if(!require(devtools)) install.packages("devtools")
devtools::install_github("kassambara/survminer")
# Fit survival curves
require("survival")
fit <- survfit( Surv(time, status) ~ rx + adhere,
data = colon )
# Visualize
library("survminer")
ggsurvplot(fit, pval = TRUE,
risk.table = TRUE,
risk.table.col = "strata",
main = "Survival Curves",
risk.table.height = 0.3, # Useful when you have multiple groups
) You should have the following plot: devtools::session_info("survminer") Session info ---------------------------------------------------------------------------------------------------------- setting value version R version 3.2.3 (2015-12-10) system x86_64, darwin13.4.0 ui RStudio (0.99.491) language (EN) collate fr_FR.UTF-8 tz Europe/Paris date 2016-03-29 Packages -------------------------------------------------------------------------------------------------------------- package * version date source colorspace 1.2-6 2015-03-11 CRAN (R 3.2.0) dichromat 2.0-0 2013-01-24 CRAN (R 3.2.0) digest 0.6.9 2016-01-08 CRAN (R 3.2.3) ggplot2 * 2.1.0 2016-03-01 CRAN (R 3.2.4) gridExtra 2.2.1 2016-02-29 CRAN (R 3.2.4) gtable 0.2.0 2016-02-26 CRAN (R 3.2.3) labeling 0.3 2014-08-23 CRAN (R 3.2.0) magrittr 1.5 2014-11-22 CRAN (R 3.2.0) MASS 7.3-45 2015-11-10 CRAN (R 3.2.3) munsell 0.4.3 2016-02-13 CRAN (R 3.2.3) plyr 1.8.3 2015-06-12 CRAN (R 3.2.0) RColorBrewer 1.1-2 2014-12-07 CRAN (R 3.2.0) Rcpp 0.12.4 2016-03-26 CRAN (R 3.2.4) reshape2 1.4.1 2014-12-06 CRAN (R 3.2.0) scales 0.4.0 2016-02-26 CRAN (R 3.2.3) stringi 1.0-1 2015-10-22 CRAN (R 3.2.0) stringr 1.0.0 2015-04-30 CRAN (R 3.2.0) survival * 2.38-3 2015-07-02 CRAN (R 3.2.3) survminer * 0.2.0.9002 2016-03-29 Github (kassambara/survminer@3e9cb1f) Best regards, |
@Feli-Anna have your tried writing your image to require("survival")
fit <- survfit( Surv(time, status) ~ rx + adhere,
data = colon )
# Visualize
library("survminer")
pdf("file.pdf", width = 15, height = 15)
ggsurvplot(fit, pval = TRUE,
risk.table = TRUE,
risk.table.col = "strata",
main = "Survival Curves",
risk.table.height = 0.3, # Useful when you have multiple groups
)
dev.off() More over are you using |
@kassambara it's been over 75 days since this request. |
As we didn't receive any request from other users about such issue, we can assume that this problem is solved with the current version of survminer. |
|
Hi again,
sorry for bringing up all these issues here, but since ggplot was updated, my code is pretty much messed up and it is really hard to fix it.
Before, the proportion of my plot to risk table was pretty nice. You could clearly see if curves cross or not.
Using the same code now, I get approximately this:
I have to hand in a report very soon and I plottet my curves with the pre-updated version, but I made some mistakes (which I can't fix now after the update....).
I'd appreciate some suggestions to fix this :)
Thanks
Feli
The text was updated successfully, but these errors were encountered: