library(tidymodels)
# Create Recipe
model_recipe <- recipes::recipe(what-to-predict ~ data-features,
data = your-data)
# Define model using parsnip (e.x. linear regression)
model_type <- parsnip::linear_reg()
# Combine the two to create a workflow
model_wflow <- workflows::workflow(model_recipe, model_type)
# Fit workflow to data using parsnip
model_fit <- parsnip::fit(model_wflow, your-data)