Reloads one or more specified R packages. If a package is not loaded, it is loaded; if already loaded, it is detached and reloaded from its library location.
Value
Returns invisible(NULL)
. The function is used for its side effect
of reloading a package rather than for its return value.
Examples
load_packages(sf)
# Reloads sf and ncdf4. terra0 does not exist
reload_package(sf, ncdf4, terra0)
#> Reloading 'sf'
#> Not installed: ncdf4
#> Not installed: terra0