reload: Unload and reload package.

Description Usage Arguments See Also Examples

View source: R/reload.R

Description

This attempts to unload and reload an installed package. If the package is not loaded already, it does nothing. It's not always possible to cleanly unload a package: see the caveats in unload() for some of the potential failure points. If in doubt, restart R and reload the package with library().

Usage

1
reload(pkg = ".", quiet = FALSE)

Arguments

pkg

package description, can be path or package name. See as.package() for more information

quiet

if TRUE suppresses output from this function.

See Also

load_all() to load a package for interactive development.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# Reload package that is in current directory
reload(".")

# Reload package that is in ./ggplot2/
reload("ggplot2/")

# Can use inst() to find the package path
# This will reload the installed ggplot2 package
reload(pkgload::inst("ggplot2"))

## End(Not run)

hadley/devtools documentation built on Nov. 12, 2018, 7:03 a.m.