This is an option that was not available in R when whitebox was originally developed. I think it is a better default than current find.package("whitebox") which gives the package folder in the library--which besides not technically being allowed, also results in annoying re-install WhiteboxTools if you re-install the R package, or if you upgrade R, or similar.
From CRAN repository policy:
For R version 4.0 or later (hence a version dependency is required or only conditional use is possible), packages may store user-specific data, configuration and cache files in their respective user directories obtained from tools::R_user_dir(), provided that by default sizes are kept as small as possible and the contents are actively managed (including removing outdated material).
[x] Write a wrapper to check for R version >=4.0. Defaults will remain the same for R<4.0 to avoid hard dependency on R 4+
[x] Use as default install location for wbt_install() (when user has no specified installation directory)
[x] Use in default path for wbt_exe_path() (when no other options have been given)
[x] Add check to wbt_init() to give message when a newer R package/data than version of WhiteboxTools installed
[x] Add wbt_uninstall() / uninstall_whitebox()remove argument to wbt_install()/install_whitebox() to clean up existing installations from R_user_dir(),
This is an option that was not available in R when whitebox was originally developed. I think it is a better default than current
find.package("whitebox")
which gives the package folder in the library--which besides not technically being allowed, also results in annoying re-install WhiteboxTools if you re-install the R package, or if you upgrade R, or similar.From CRAN repository policy:
wbt_install()
(when user has no specified installation directory)wbt_exe_path()
(when no other options have been given)wbt_init()
to give message when a newer R package/data than version of WhiteboxTools installedwbt_uninstall()
/uninstall_whitebox()
remove
argument towbt_install()
/install_whitebox()
to clean up existing installations fromR_user_dir()
,