Git Product home page Git Product logo

Comments (7)

kassambara avatar kassambara commented on July 16, 2024

Hi,

I think that you don't have the latest version of survminer installed on your computer.

  • Remove the current version:
remove.packages("survminer")
  • Install the latest version from GitHub
if(!require(devtools)) install.packages("devtools")
devtools::install_github("kassambara/survminer")
  • Use 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:

rplot

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,
AK

from survminer.

Feli-Anna avatar Feli-Anna commented on July 16, 2024

I did as you said.

Now I have this

rplot01f

Still, the proportions don't fit.....

from survminer.

MarcinKosinski avatar MarcinKosinski commented on July 16, 2024

@Feli-Anna have your tried writing your image to pdf file?

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 zoom in RStudio to have better view of the plots that are not saved to pdf file?

from survminer.

MarcinKosinski avatar MarcinKosinski commented on July 16, 2024

@Feli-Anna ?

from survminer.

MarcinKosinski avatar MarcinKosinski commented on July 16, 2024

@kassambara it's been over 75 days since this request.
Are we closing this issue with won't fix or can't reproduce (or even solved)?

from survminer.

kassambara avatar kassambara commented on July 16, 2024

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.

from survminer.

MarcinKosinski avatar MarcinKosinski commented on July 16, 2024

I can't close this. No read/write rights and it's not mine issue. You are the only one who can close this.

from survminer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.