Skip to contents

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.

Usage

reload_package(...)

Arguments

...

Unquoted package names (e.g., sf, ncdf4). Must be installed packages. Multiple packages can be specified.

Value

Returns invisible(NULL). The function is used for its side effect of reloading a package rather than for its return value.

Author

Ahmed El-Gabbas

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