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.
Details
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.
Examples
# Set root to a temporary directory
dir <- tempdir()
set_sourcoise_root(dir)
#> /tmp/Rtmp4DcgLO
# Reset to automatic detection
set_sourcoise_root(NULL)
#> /tmp/Rtmp4DcgLO
# Set root with messages enabled
set_sourcoise_root(dir, quiet = FALSE)
#> /tmp/Rtmp4DcgLO
