View source: R/set_dependency.R
set_dependency | R Documentation |
This function is used to register a mode for a model, engine, and mode combination.
set_dependency(model, mode, eng, pkg)
get_dependency(model)
model |
A single character string for the model type (e.g.
|
mode |
A single character string for the model mode (e.g. "partition"). |
eng |
A single character string for the model engine. |
pkg |
An options character string for a package name. |
This function should for each package that needs to be added as a dependency.
The mode
needs to be set explicitly, and dependencies needs to be specified
for each model
, mode
and eng
combination.
A tibble
set_new_model("shallow_learning_model")
set_model_mode("shallow_learning_model", "partition")
set_model_engine("shallow_learning_model", "partition", "stats")
set_dependency("shallow_learning_model", "partition", "stats", "base")
get_dependency("shallow_learning_model")
get_dependency("shallow_learning_model")$pkg
set_dependency("shallow_learning_model", "partition", "stats", "stats")
get_dependency("shallow_learning_model")
get_dependency("shallow_learning_model")$pkg
# Only unique packages are kept
set_dependency("shallow_learning_model", "partition", "stats", "stats")
get_dependency("shallow_learning_model")
get_dependency("shallow_learning_model")$pkg
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.