| model_exists | R Documentation |
This is an internal helper function to check if a model specification has been
registered in the parsnip model environment.
model_exists(model_name)
model_name |
A character string giving the name of the model specification function to check (e.g., "my_mlp"). |
A logical value, TRUE if the model exists, FALSE otherwise.
if (requireNamespace("parsnip", quietly = TRUE)) {
library(parsnip)
# Check for a model that exists in parsnip
model_exists("mlp")
# Check for a model that does not exist
model_exists("non_existent_model")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.