You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracing the error, it happens when .fit_model() invokes fit.action_model(). In there, the formula is correctly extracted:
sale_surv ~ sex + id(sample_id)
<environment: 0x12ee76170>
From here, it calls fit_from_formula() when then calls fit.model_spec() via
fit(spec, formula = formula, data = data, case_weights = case_weights,
control = control_parsnip)
This leads to calling
survival::coxph(formula = sale_surv ~ sex + id(sample_id), data = data,
x = TRUE, model = TRUE)
id is a “formula special” and isn’t a function in the survival package (so using the conflicted isn’t a solution).
Note that the same call to results in the same error when run in the global environment:
> survival::coxph(formula = sale_surv ~ sex + id(sample_id), data = mod_df,
+ x = TRUE, model = TRUE)
Error:
! `id()` was deprecated in dplyr 0.5.0 and is now defunct.
ℹ Please use `vctrs::vec_group_id()` instead.
Run `rlang::last_trace()` to see where the error occurred.
topepo
changed the title
workflows confuses a 'id' special for dplyr::id()
workflows confuses an 'id' special for dplyr::id()
Nov 7, 2024
See https://stackoverflow.com/questions/79163528/multistate-survival-models-with-censored-and-tidymodels
This might end up being a parsnip issue but we should start here.
The text was updated successfully, but these errors were encountered: