These functions are mainly internal. They can access and validate
different layers of frosting
.
Usage
extract_layers(x, ...)
# S3 method for class 'frosting'
extract_layers(x, ...)
# S3 method for class 'workflow'
extract_layers(x, ...)
is_layer(x)
validate_layer(x, ..., arg = rlang::caller_arg(x), call = caller_env())
detect_layer(x, name, ...)
# S3 method for class 'frosting'
detect_layer(x, name, ...)
# S3 method for class 'workflow'
detect_layer(x, name, ...)
Examples
f <- frosting() %>% layer_predict()
wf <- epi_workflow(postprocessor = f)
is_layer(layer("what_the_what"))
#> Error: Can't create layer without a stat.
detect_layer(f, "layer_predict")
#> [1] TRUE
detect_layer(wf, "layer_predict")
#> [1] TRUE
extract_layers(f)
#> [[1]]
#> Creating predictions: "<calculated>"
#>
extract_layers(wf)
#> [[1]]
#> Creating predictions: "<calculated>"
#>