installLocalPackage: Install or Reinstall a Local R Package

View source: R/package_ops.R

installLocalPackageR Documentation

Install or Reinstall a Local R Package

Description

Installs or reinstalls a local R package from the specified directory. Useful during development to ensure the package is rebuilt with updated source code and documentation.

Usage

installLocalPackage(sPackageDirPath)

Arguments

sPackageDirPath

Character string. Path to the local package directory.

Details

The function performs the following steps: - Ensures 'remotes' and 'roxygen2' are installed. - Generates updated documentation using roxygen2::roxygenise(). - Detaches the package if already loaded. - Deletes compiled files such as .o, .so, or .dll for a clean rebuild. - Installs the package using remotes::install_local().

Value

Invisibly returns NULL. Prints installation progress and success/failure messages.

See Also

install_local, roxygenise

Examples

## Not run: 
installLocalPackage()
installLocalPackage("/path/to/custom/package_dir")

## End(Not run)


ChristK/CKutils documentation built on April 11, 2025, 10:11 p.m.