In #4 @brownag mentioned moving terra and other r-spatial packages from Imports to Suggests, and I think this is a good call. We shouldn't require users to have all supported r-spatial packages installed just to use targets with one of them. rlang::check_installed() prompts users to install a missing package and installs it for them, but since this code will mostly be run in a callr environment, it might be more appropriate to just use rlang::is_installed(). We could even supply a custom tip like
! package terra is required.
Did you forget to add "terra" to tar_option_set(packages =?
In #4 @brownag mentioned moving
terra
and other r-spatial packages from Imports to Suggests, and I think this is a good call. We shouldn't require users to have all supported r-spatial packages installed just to usetargets
with one of them.rlang::check_installed()
prompts users to install a missing package and installs it for them, but since this code will mostly be run in acallr
environment, it might be more appropriate to just userlang::is_installed()
. We could even supply a custom tip like