reload: Reload an Installed Package

View source: R/dev.R

reloadR Documentation

Reload an Installed Package

Description

Unloads a package if loaded, reinstalls it, and loads it again. Convenience function for the install-reload cycle during development.

Usage

reload(path = ".", document = FALSE, quiet = TRUE)

Arguments

path

Path to package root directory.

document

If TRUE and tinyrox is available, run tinyrox::document() before installing. Default FALSE.

quiet

Logical. Suppress install output? Default TRUE.

Value

TRUE if successful (invisibly).

Examples

# Calls install() under the hood, which writes to the user's R
# library. Wrapped in if(interactive()) so checks never mutate it.

if (interactive()) {
  reload()
  reload(document = TRUE)
}


tinypkgr documentation built on April 22, 2026, 9:07 a.m.