getting an error with ggsurvplot

Hi,
I am getting an error with ggsurvplot

this is my code:

KM <- survfit(Surv(data$t2dhfh, data$dhfh) ~ data$Diabetes.x)
summary(KM)

ggsurvplot(KM, data = data, risk.table = F, conf.int = F, pval = T, pval.method = F, fun = "event",
title = "", xlab="days", legend=c(0.85, 0.3), legend.title="",
legend.lab=c("no diabetes", "diabetes"),
palette = c("brown", "blue"), pval.coord=c(5, 0.6))

I am getting this error below whenever I run ggsurvplot:

Error in dplyr::select():
! ... must be empty.
x Problematic argument:

  • call = call

This is the same code I used before and never had issues with it until now
I tried restarting r, and I tried to search it online but I could not solve this issue
I appreciate any help i can get
sorry for any inconvenience, thanks

Backtrace:

  1. survminer::ggsurvplot(...)
  2. dplyr:::select.data.frame(., variable, dplyr::everything())
  3. tidyselect::eval_select(expr(c(...)), .data)
  4. tidyselect:::eval_select_impl(...)
  5. tidyselect:::vars_select_eval(...)
  6. tidyselect:::walk_data_tree(expr, data_mask, context_mask)
  7. tidyselect:::eval_c(expr, data_mask, context_mask)
  8. tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
  9. tidyselect:::walk_data_tree(init, data_mask, context_mask)
  10. tidyselect:::as_indices_sel_impl(...)
  11. tidyselect:::as_indices_impl(...)
  12. vctrs::vec_as_subscript(x, logical = "error", call = call, arg = arg)
    Run rlang::last_trace() to see the full context.

rlang::last_trace()
<error/rlib_error_dots_nonempty>
Error in dplyr::select():
! ... must be empty.
x Problematic argument:

  • call = call

Backtrace:
x

  1. +-survminer::ggsurvplot(...)
  2. | +-base::do.call(ggsurvplot_core, opts)
  3. | -survminer (local) <fn>(...)
  4. | -survminer::surv_pvalue(...)
  5. | -... %>% dplyr::select(variable, dplyr::everything())
  6. +-dplyr::select(., variable, dplyr::everything())
  7. -dplyr:::select.data.frame(., variable, dplyr::everything())
  8. +-dplyr:::tidyselect_fix_call(...)
  9. | -base::withCallingHandlers(...)
  10. -tidyselect::eval_select(expr(c(...)), .data)
  11. \-tidyselect:::eval_select_impl(...)
    
  12.   +-tidyselect:::with_subscript_errors(...)
    
  13.   | \-rlang::try_fetch(...)
    
  14.   |   \-base::withCallingHandlers(...)
    
  15.   \-tidyselect:::vars_select_eval(...)
    
  16.     \-tidyselect:::walk_data_tree(expr, data_mask, context_mask)
    
  17.       \-tidyselect:::eval_c(expr, data_mask, context_mask)
    
  18.         \-tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
    
  19.           \-tidyselect:::walk_data_tree(init, data_mask, context_mask)
    
  20.             \-tidyselect:::as_indices_sel_impl(...)
    
  21.               \-tidyselect:::as_indices_impl(...)
    
  22.                 \-vctrs::vec_as_subscript(x, logical = "error", call = call, arg = arg)
    
  23.                   \-ellipsis::check_dots_empty()
    
  24.                     \-rlang:::action_dots(...)
    
  25.                       +-base (local) try_dots(...)
    
  26.                       \-rlang (local) action(...)
    

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.