Skip to contents

Extract the inner model of a nested_model object, or a workflow containing a nested model.

Usage

extract_inner_model(x, ...)

# S3 method for default
extract_inner_model(x, ...)

# S3 method for nested_model
extract_inner_model(x, ...)

# S3 method for workflow
extract_inner_model(x, ...)

# S3 method for model_spec
extract_inner_model(x, ...)

Arguments

x

A model spec or workflow.

...

Not used.

Value

A model_spec object

Examples


library(parsnip)

model <- linear_reg() %>%
  set_engine("lm") %>%
  nested()

extract_inner_model(model)
#> Linear Regression Model Specification (regression)
#> 
#> Computational engine: lm 
#>