Skip to content
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

ggsurvplot displaying error #639

Open
pmpradhan opened this issue Jan 11, 2024 · 0 comments
Open

ggsurvplot displaying error #639

pmpradhan opened this issue Jan 11, 2024 · 0 comments

Comments

@pmpradhan
Copy link

Expected behavior

To produce survival curve with confidence intervals.

Actual behavior

Error in data.frame(..., check.names = FALSE) :
arguments imply differing number of rows: 12471, 0, 24942

Steps to reproduce the problem

One year ago, this

surv <- ggsurvplot(

  • kmsurv, data = df,
  • conf.int = TRUE,
  • legend.labs = c("ANTICOAGULANT","ANTIPLATELET", "FIBRINOLYTIC", "SWITCHERS", "WARFARIN"),
  • main = "Survival Plot",
  • xlab = "Time (in days)",
  • ylab = "Survival Probability"
  • )
    code used to produce graphs with confidence interval but recently running this code returns error:'Error in data.frame(..., check.names = FALSE) :
    arguments imply differing number of rows: 12471, 0, 24942 '

Please fix this!!

session_info()

# please paste here the result of
devtools::session_info()
> devtools::session_info()
- Session info -----------------------------------------------------------------------------------
 setting  value
 version  R version 4.2.3 (2023-03-15 ucrt)
 os       Windows Server x64 (build 14393)
 system   x86_64, mingw32
 ui       RStudio
 language (EN)
 collate  English_United States.1252
 ctype    English_United States.1252
 tz       America/Chicago
 date     2024-01-10
 rstudio  2023.06.0+421 Mountain Hydrangea (desktop)
 pandoc   NA

- Packages ---------------------------------------------------------------------------------------
 package     * version date (UTC) lib source
 abind         1.4-5   2016-07-21 [1] CRAN (R 4.2.0)
 backports     1.4.1   2021-12-13 [1] CRAN (R 4.2.0)
 broom         1.0.5   2023-06-09 [1] CRAN (R 4.2.3)
 cachem        1.0.8   2023-05-01 [1] CRAN (R 4.2.3)
 car           3.1-2   2023-03-30 [1] CRAN (R 4.2.3)
 carData       3.0-5   2022-01-06 [1] CRAN (R 4.2.3)
 cli           3.6.1   2023-03-23 [1] CRAN (R 4.2.3)
 colorspace    2.1-0   2023-01-23 [1] CRAN (R 4.2.3)
 data.table    1.14.10 2023-12-08 [1] CRAN (R 4.2.3)
 devtools    * 2.4.5   2022-10-11 [1] CRAN (R 4.2.3)
 digest        0.6.33  2023-07-07 [1] CRAN (R 4.2.3)
 dplyr         1.1.4   2023-11-17 [1] CRAN (R 4.2.3)
 ellipsis      0.3.2   2021-04-29 [1] CRAN (R 4.2.3)
 fansi         1.0.6   2023-12-08 [1] CRAN (R 4.2.3)
 fastmap       1.1.1   2023-02-24 [1] CRAN (R 4.2.3)
 fs            1.6.3   2023-07-20 [1] CRAN (R 4.2.3)
 generics      0.1.3   2022-07-05 [1] CRAN (R 4.2.3)
 ggplot2     * 3.4.4   2023-10-12 [1] CRAN (R 4.2.3)
 ggpubr      * 0.6.0   2023-02-10 [1] CRAN (R 4.2.3)
 ggsignif      0.6.4   2022-10-13 [1] CRAN (R 4.2.3)
 glue          1.6.2   2022-02-24 [1] CRAN (R 4.2.3)
 gridExtra     2.3     2017-09-09 [1] CRAN (R 4.2.3)
 gtable        0.3.4   2023-08-21 [1] CRAN (R 4.2.3)
 htmltools     0.5.7   2023-11-03 [1] CRAN (R 4.2.3)
 htmlwidgets   1.6.4   2023-12-06 [1] CRAN (R 4.2.3)
 httpuv        1.6.13  2023-12-06 [1] CRAN (R 4.2.3)
 km.ci         0.5-6   2022-04-06 [1] CRAN (R 4.2.3)
 KMsurv        0.1-5   2012-12-03 [1] CRAN (R 4.2.0)
 knitr         1.45    2023-10-30 [1] CRAN (R 4.2.3)
 later         1.3.2   2023-12-06 [1] CRAN (R 4.2.3)
 lattice       0.20-45 2021-09-22 [2] CRAN (R 4.2.3)
 lifecycle     1.0.3   2022-10-07 [1] CRAN (R 4.2.3)
 magrittr      2.0.3   2022-03-30 [1] CRAN (R 4.2.3)
 Matrix        1.6-4   2023-11-30 [1] CRAN (R 4.2.3)
 memoise       2.0.1   2021-11-26 [1] CRAN (R 4.2.3)
 mime          0.12    2021-09-28 [1] CRAN (R 4.2.0)
 miniUI        0.1.1.1 2018-05-18 [1] CRAN (R 4.2.3)
 munsell       0.5.0   2018-06-12 [1] CRAN (R 4.2.3)
 pacman        0.5.1   2019-03-11 [1] CRAN (R 4.2.3)
 pillar        1.9.0   2023-03-22 [1] CRAN (R 4.2.3)
 pkgbuild      1.4.3   2023-12-10 [1] CRAN (R 4.2.3)
 pkgconfig     2.0.3   2019-09-22 [1] CRAN (R 4.2.3)
 pkgload       1.3.3   2023-09-22 [1] CRAN (R 4.2.3)
 profvis       0.3.8   2023-05-02 [1] CRAN (R 4.2.3)
 promises      1.2.1   2023-08-10 [1] CRAN (R 4.2.3)
 purrr         1.0.2   2023-08-10 [1] CRAN (R 4.2.3)
 R6            2.5.1   2021-08-19 [1] CRAN (R 4.2.3)
 Rcpp          1.0.11  2023-07-06 [1] CRAN (R 4.2.3)
 remotes       2.4.2.1 2023-07-18 [1] CRAN (R 4.2.3)
 rlang         1.1.2   2023-11-04 [1] CRAN (R 4.2.3)
 rstatix       0.7.2   2023-02-01 [1] CRAN (R 4.2.3)
 rstudioapi    0.15.0  2023-07-07 [1] CRAN (R 4.2.3)
 scales        1.3.0   2023-11-28 [1] CRAN (R 4.2.3)
 sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.2.3)
 shiny         1.8.0   2023-11-17 [1] CRAN (R 4.2.3)
 stringi       1.7.12  2023-01-11 [1] CRAN (R 4.2.2)
 stringr       1.5.0   2022-12-02 [1] CRAN (R 4.2.3)
 survival    * 3.5-7   2023-08-14 [1] CRAN (R 4.2.3)
 survminer   * 0.4.9   2021-03-09 [1] CRAN (R 4.2.3)
 survMisc      0.5.6   2022-04-07 [1] CRAN (R 4.2.3)
 tibble        3.2.1   2023-03-20 [1] CRAN (R 4.2.3)
 tidyr         1.3.0   2023-01-24 [1] CRAN (R 4.2.3)
 tidyselect    1.2.0   2022-10-10 [1] CRAN (R 4.2.3)
 urlchecker    1.0.1   2021-11-30 [1] CRAN (R 4.2.3)
 usethis     * 2.2.2   2023-07-06 [1] CRAN (R 4.2.3)
 utf8          1.2.4   2023-10-22 [1] CRAN (R 4.2.3)
 vctrs         0.6.5   2023-12-01 [1] CRAN (R 4.2.3)
 withr         2.5.2   2023-10-30 [1] CRAN (R 4.2.3)
 xfun          0.41    2023-11-01 [1] CRAN (R 4.2.3)
 xtable        1.8-4   2019-04-21 [1] CRAN (R 4.2.3)
 zoo           1.8-12  2023-04-13 [1] CRAN (R 4.2.3)

 [1] C:/Users/pradh012/AppData/Local/R/win-library/4.2
 [2] C:/Program Files/R/R-4.2.3/library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant