| set_sourcoise_root | R Documentation |
This function allows you to manually set the root directory for the sourcoise package,
bypassing the automatic root detection mechanism used by sourcoise(). Setting the root
directory affects where sourcoise looks for files and stores cache data.
set_sourcoise_root(root = NULL, quiet = TRUE)
root |
Path to the desired root directory. If |
quiet |
Logical value indicating whether to suppress messages during root detection.
Default is |
By default, sourcoise automatically detects the project root. This function is equivalent
to setting the sourcoise.root option directly, except when dealing with file-level cache
storage. To enable file-level cache storage behavior, set root to NULL.
The root path that was set (character string), invisibly returned by
try_find_root().
# Set root to a temporary directory
dir <- tempdir()
set_sourcoise_root(dir)
# Reset to automatic detection
set_sourcoise_root(NULL)
# Set root with messages enabled
set_sourcoise_root(dir, quiet = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.