qhuitan / ggbulksurv

An R package for bulk survival analysis
https://qhuitan.github.io/ggbulksurv/
Other
1 stars 0 forks source link

Error when running get_indiv_surv() or run_bulksurv() commands #1

Open mtyrlik opened 4 months ago

mtyrlik commented 4 months ago

Describe the bug Error when running get_indiv_surv() or run_bulksurv() commands

Expected behavior For the code to execute without error and generate data frame in format acceptable by the conventional survival analysis functions.

Instead I get the following error message:

Error in tidyr::uncount(): ! Can't convert weights to . Backtrace:

  1. ggbulksurv::get_indiv_surv(...)
  2. tidyr:::uncount.data.frame(., censored)

after running get_indiv_surv(sample_data=dat,sample_order = c("control","experimental")). dat is a data.frame() that includes the day, dead, and censored columns. I get same error when running the run_bulksurv() function.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

sessionInfo() R version 4.4.0 (2024-04-24) Platform: aarch64-apple-darwin20 Running under: macOS Sonoma 14.5

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] BiocManager_1.30.23 magrittr_2.0.3 mtplot_1.3.1 lubridate_1.9.3 forcats_1.0.0
[6] stringr_1.5.1 dplyr_1.1.4 purrr_1.0.2 readr_2.1.5 tidyr_1.3.1
[11] tibble_3.2.1 ggplot2_3.5.1 tidyverse_2.0.0 ggbulksurv_0.3.0 devtools_2.4.5
[16] usethis_2.2.3

qhuitan commented 4 months ago

Hi @mtyrlik ,

It seems like there is an issue with the data in your censored column. Could you run str(dat) to check whether the censored column has type int or num?