| bru_safe_terra | R Documentation |
terra installation issuesLoads the terra package with requireNamespace("terra", quietly = TRUE),
and checks whether eval_spatial() successfully extracts non-NA values.
NA values may appear when there is a GDAL/PROJ installation issue that causes
it to not find the proj.db database file.
For use in package tests and examples that depend on terra.
bru_safe_terra(quietly = FALSE, minimum_version = "1.7-66")
quietly |
logical; if |
minimum_version |
character; the minimum required version. Default 1.7-66 (should always match the requirement in the package DESCRIPTION) |
Returns (invisibly) FALSE if a potential issue is detected, and
give a message if quietly is FALSE. Otherwise returns TRUE
## Not run:
if (bru_safe_terra()) {
# Run terra dependent calculations
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.