req_tree_pkgs | R Documentation |
model_tree()
Required packages for running model_tree()
req_tree_pkgs(static = FALSE)
check_for_model_tree_pkgs(static = FALSE)
skip_if_tree_missing_deps(static = FALSE)
stop_if_tree_missing_deps(static = FALSE)
static |
Logical ( |
The packages below are required for both interactive and static viewing:
collapsibleTree
for the core plot
scales
for coloring the tree nodes. Should be installed with ggplot2
,
which has been a bbr
suggested package.
The packages below are all used for rendering the model tree as a static image:
htmlwidgets
is a dependency of collapsibleTree
, so it's a 'free'
import. It's used to save the tree diagram out as an HTML
file.
grid
is a built-in R package and is used to display the PNG in the
Rstudio viewer.
webshot
is needed for taking a screenshot of the rendered HTML,
saved out via htmlwidgets::saveWidget()
.
png
is needed for reading in a PNG file as an array, in order to plot
it in the Rstudio viewer.
Returns a vector with the missing packages, or returns NULL if all are present.
check_for_model_tree_pkgs()
: Checks if all packages needed for model_tree()
are present
skip_if_tree_missing_deps()
: Skip tests if missing model_tree()
dependencies
stop_if_tree_missing_deps()
: Error if missing model_tree()
dependencies. Called internally
within model_tree()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.