Hello!
I am using the hardhat package to write a package that performs modeling for time to event outcomes. We use survival::Surv()
to construct the outcome. The hardhat documentation was great for helping get a "formula" method working, e.g. foo(Surv(time, status) ~ var1 + var2)
.
The hardhat documentation also walks through how to include a recipes method, so users can construct the models this way. But I am getting an error. What is the best way to integrate a modeling package with time to event outcomes into a tidymodels framework?
Thank you!
library(survival)
recipes::recipe(Surv(time, status) ~ age, data = lung)
#> Error: No in-line functions should be used here; use steps to define baking actions.
Created on 2021-11-04 by the reprex package (v2.0.1)