jinseob2kim / jstable

Regression Tables from 'GLM', 'GEE', 'GLMM', 'Cox' and 'survey' Results.
https://jinseob2kim.github.io/jstable/
Apache License 2.0
22 stars 13 forks source link

Error in `mutate()`: ! Can't transform a data frame with `NA` or `""` names. #15

Closed ciciing closed 7 months ago

ciciing commented 9 months ago

Dear author.thanks for your excellent working, but i have some questions, Error in mutate(): ! Can't transform a data frame with NA or "" names. Run rlang::last_trace() to see where the error occurred.

rlang::last_trace(drop = FALSE) <error/rlang_error> Error in mutate(): ! Can't transform a data frame with NA or "" names.

Backtrace: ▆

  1. ├─base::as.data.frame(...)
  2. ├─jstable::TableSubgroupMultiCox(...)
  3. │ └─jstable::TableSubgroupCox(...)
  4. │ └─... %>% ...
  5. ├─dplyr::mutate(...)
  6. └─dplyr:::mutate.data.frame(., P value = ifelse(pv >= 0.001, pv, "<0.001"), P for interaction = NA)
  7. └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
  8. └─DataMask$new(data, by, "mutate", error_call = error_call)
  9. └─dplyr (local) initialize(...)
  10. └─rlang::abort(...) this is my code: sum(is.na(data)) [1] 0 senlintudataframe <- TableSubgroupMultiCox(formula = Surv(time,status)~TyG, var_subgroups = c("Age","sex","BMI","smoke","education","HbA1csenlin","Uricacid", "hypertension","heartfailure","stroke","CAD"), var_cov = c("Age","sex","BMI","smoke","education","HbA1csenlin","Uricacid", "hypertension","heartfailure","stroke","CAD"), data = data) and I'll show you the data that I use Could you please provide guidance or suggestions on how to resolve it? I appreciate your help! data.csv
ciciing commented 9 months ago

I forgot to say that when i add "var_cov = c("Age","sex","BMI","smoke","education","HbA1csenlin","Uricacid", "hypertension","heartfailure","stroke","CAD")," I get the error.And when I delete this row, it can run it.

jinseob2kim commented 8 months ago

Thanks for your comments. Could you install the latest version ? @cyk0315 was fixed the issues

remotes::install_github("jinseob2kim/jstable")