kassambara / survminer

Survival Analysis and Visualization
https://rpkgs.datanovia.com/survminer/
509 stars 164 forks source link

Warning messages when making a forest plot for the results of univariate Cox regression and the resultant graph does not output #481

Closed vaibhav-k closed 4 years ago

vaibhav-k commented 4 years ago

Expected behavior

Saving the ggforest() plot as a PDF file.

Actual behavior

A blank graph with the title "Hazard ratio" saved as a PDF in the intended directory. By blank, I mean a PDF is generated with only the text Hazard Ratio on the top of the second page.

A possible problem might be that the Hazard Ratios to be plotted are of the order of 10^284.

Is such a large hazard ratio even possible?

The warning messages printed are: Warning messages: 1: Transformation introduced infinite values in continuous y-axis 2: Removed 1 rows containing missing values (geom_text). 3: Removed 1 rows containing missing values (geom_text). 4: Removed 1 rows containing missing values (geom_text). 5: Removed 1 rows containing missing values (geom_text). 6: Removed 1 rows containing missing values (geom_text). 7: Removed 1 rows containing missing values (geom_text). 8: Position guide is perpendicular to the intended axis. Did you mean to specify a different guide position? 9: Transformation introduced infinite values in continuous y-axis 10: Removed 1 rows containing missing values (geom_text). 11: Removed 1 rows containing missing values (geom_text). 12: Removed 1 rows containing missing values (geom_text). 13: Removed 1 rows containing missing values (geom_text). 14: Removed 1 rows containing missing values (geom_text). 15: Removed 1 rows containing missing values (geom_text). 16: Position guide is perpendicular to the intended axis. Did you mean to specify a different guide position? 17: Transformation introduced infinite values in continuous y-axis 18: Removed 1 rows containing missing values (geom_text). 19: Removed 1 rows containing missing values (geom_text). 20: Removed 1 rows containing missing values (geom_text). 21: Removed 1 rows containing missing values (geom_text). 22: Removed 1 rows containing missing values (geom_text). 23: Removed 1 rows containing missing values (geom_text). 24: Position guide is perpendicular to the intended axis. Did you mean to specify a different guide position?

Steps to reproduce the problem

Try plotting a forest plot for an isoform with the Hazard Ratio of 2.06e+284.

session_info()

─ Session info ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 4.0.2 (2020-06-22)
 os       Ubuntu 18.04.4 LTS          
 system   x86_64, linux-gnu           
 ui       RStudio                     
 language en_GB:en                    
 collate  en_GB.UTF-8                 
 ctype    en_GB.UTF-8                 
 tz       Asia/Kolkata                
 date     2020-06-28                  

─ Packages ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package      * version date       lib source        
 abind          1.4-5   2016-07-21 [1] CRAN (R 4.0.1)
 assertthat     0.2.1   2019-03-21 [1] CRAN (R 4.0.1)
 backports      1.1.7   2020-05-13 [1] CRAN (R 4.0.1)
 Biobase      * 2.48.0  2020-04-27 [1] Bioconductor  
 BiocGenerics * 0.34.0  2020-04-27 [1] Bioconductor  
 broom          0.5.6   2020-04-20 [1] CRAN (R 4.0.1)
 callr          3.4.3   2020-03-28 [1] CRAN (R 4.0.1)
 car            3.0-8   2020-05-21 [1] CRAN (R 4.0.1)
 carData        3.0-4   2020-05-22 [1] CRAN (R 4.0.1)
 cellranger     1.1.0   2016-07-27 [1] CRAN (R 4.0.1)
 cli            2.0.2   2020-02-28 [1] CRAN (R 4.0.1)
 colorspace     1.4-1   2019-03-18 [1] CRAN (R 4.0.1)
 cowplot        1.0.0   2019-07-11 [1] CRAN (R 4.0.1)
 crayon         1.3.4   2017-09-16 [1] CRAN (R 4.0.1)
 curl           4.3     2019-12-02 [1] CRAN (R 4.0.1)
 data.table     1.12.8  2019-12-09 [1] CRAN (R 4.0.1)
 desc           1.2.0   2018-05-01 [1] CRAN (R 4.0.1)
 devtools       2.3.0   2020-04-10 [1] CRAN (R 4.0.2)
 digest         0.6.25  2020-02-23 [1] CRAN (R 4.0.1)
 dplyr          1.0.0   2020-05-29 [1] CRAN (R 4.0.1)
 ellipsis       0.3.1   2020-05-15 [1] CRAN (R 4.0.1)
 fansi          0.4.1   2020-01-08 [1] CRAN (R 4.0.1)
 farver         2.0.3   2020-01-16 [1] CRAN (R 4.0.1)
 forcats        0.5.0   2020-03-01 [1] CRAN (R 4.0.1)
 foreign        0.8-80  2020-05-24 [1] CRAN (R 4.0.1)
 fs             1.4.1   2020-04-04 [1] CRAN (R 4.0.1)
 generics       0.0.2   2018-11-29 [1] CRAN (R 4.0.1)
 ggplot2      * 3.3.1   2020-05-28 [1] CRAN (R 4.0.1)
 ggpubr       * 0.3.0   2020-05-04 [1] CRAN (R 4.0.1)
 ggsignif       0.6.0   2019-08-08 [1] CRAN (R 4.0.1)
 glue           1.4.1   2020-05-13 [1] CRAN (R 4.0.1)
 gridExtra      2.3     2017-09-09 [1] CRAN (R 4.0.1)
 gtable         0.3.0   2019-03-25 [1] CRAN (R 4.0.1)
 haven          2.3.1   2020-06-01 [1] CRAN (R 4.0.1)
 hms            0.5.3   2020-01-08 [1] CRAN (R 4.0.1)
 km.ci          0.5-2   2009-08-30 [1] CRAN (R 4.0.1)
 KMsurv         0.1-5   2012-12-03 [1] CRAN (R 4.0.1)
 knitr          1.28    2020-02-06 [1] CRAN (R 4.0.1)
 labeling       0.3     2014-08-23 [1] CRAN (R 4.0.1)
 lattice        0.20-41 2020-04-02 [1] CRAN (R 4.0.1)
 lifecycle      0.2.0   2020-03-06 [1] CRAN (R 4.0.1)
 magrittr       1.5     2014-11-22 [1] CRAN (R 4.0.1)
 Matrix         1.2-18  2019-11-27 [1] CRAN (R 4.0.1)
 memoise        1.1.0   2017-04-21 [1] CRAN (R 4.0.2)
 munsell        0.5.0   2018-06-12 [1] CRAN (R 4.0.1)
 nlme           3.1-148 2020-05-24 [1] CRAN (R 4.0.1)
 openxlsx       4.1.5   2020-05-06 [1] CRAN (R 4.0.1)
 pillar         1.4.4   2020-05-05 [1] CRAN (R 4.0.1)
 pkgbuild       1.0.8   2020-05-07 [1] CRAN (R 4.0.1)
 pkgconfig      2.0.3   2019-09-22 [1] CRAN (R 4.0.1)
 pkgload        1.1.0   2020-05-29 [1] CRAN (R 4.0.1)
 prettyunits    1.1.1   2020-01-24 [1] CRAN (R 4.0.1)
 processx       3.4.2   2020-02-09 [1] CRAN (R 4.0.1)
 ps             1.3.3   2020-05-08 [1] CRAN (R 4.0.1)
 purrr          0.3.4   2020-04-17 [1] CRAN (R 4.0.1)
 R6             2.4.1   2019-11-12 [1] CRAN (R 4.0.1)
 Rcpp           1.0.4.6 2020-04-09 [1] CRAN (R 4.0.1)
 readxl         1.3.1   2019-03-13 [1] CRAN (R 4.0.1)
 remotes        2.1.1   2020-02-15 [1] CRAN (R 4.0.2)
 rio            0.5.16  2018-11-26 [1] CRAN (R 4.0.1)
 rlang          0.4.6   2020-05-02 [1] CRAN (R 4.0.1)
 rprojroot      1.3-2   2018-01-03 [1] CRAN (R 4.0.1)
 rstatix        0.5.0   2020-04-28 [1] CRAN (R 4.0.1)
 rstudioapi     0.11    2020-02-07 [1] CRAN (R 4.0.1)
 scales         1.1.1   2020-05-11 [1] CRAN (R 4.0.1)
 sessioninfo    1.1.1   2018-11-05 [1] CRAN (R 4.0.2)
 stringi        1.4.6   2020-02-17 [1] CRAN (R 4.0.1)
 survival     * 3.1-12  2020-04-10 [1] CRAN (R 4.0.1)
 survminer    * 0.4.7   2020-05-28 [1] CRAN (R 4.0.1)
 survMisc       0.5.5   2018-07-05 [1] CRAN (R 4.0.1)
 testthat       2.3.2   2020-03-02 [1] CRAN (R 4.0.1)
 tibble         3.0.1   2020-04-20 [1] CRAN (R 4.0.1)
 tidyr          1.1.0   2020-05-20 [1] CRAN (R 4.0.1)
 tidyselect     1.1.0   2020-05-11 [1] CRAN (R 4.0.1)
 tinytex        0.23    2020-05-19 [1] CRAN (R 4.0.1)
 usethis        1.6.1   2020-04-29 [1] CRAN (R 4.0.1)
 vctrs          0.3.1   2020-06-05 [1] CRAN (R 4.0.1)
 withr          2.2.0   2020-04-20 [1] CRAN (R 4.0.1)
 xfun           0.14    2020-05-20 [1] CRAN (R 4.0.1)
 xtable         1.8-4   2019-04-21 [1] CRAN (R 4.0.1)
 zip            2.0.4   2019-09-01 [1] CRAN (R 4.0.1)
 zoo            1.8-8   2020-05-02 [1] CRAN (R 4.0.1)

[1] /home/vaibhav/R/x86_64-pc-linux-gnu-library/4.0
[2] /usr/local/lib/R/site-library
[3] /usr/lib/R/site-library
[4] /usr/lib/R/library
vaibhav-k commented 4 years ago

I filtered the input data so that the isoforms with low variance were deleted from the data.