install_package_local: Install a Package from a Local Source Directory

View source: R/install_package_local.R

install_package_localR Documentation

Install a Package from a Local Source Directory

Description

Attempts to install an R package from a local source directory using remotes::install_local(). The function reports on whether installation succeeded, whether the package was already installed, or whether the provided source path does not exist.

Usage

install_package_local(pkg_source_path)

Arguments

pkg_source_path

Character string. Path to the local package source directory (e.g., an unpacked package or extracted tarball path).

Details

The display name of the package is derived from the input path using get_pkg_name().

Value

A logical value indicating whether the package is installed after running the function.

The returned object is always of class logical:

  • TRUE — The package is already installed or was successfully installed.

  • FALSE — Installation failed or the path does not exist.

Output Meaning

TRUE does not necessarily imply that the installation occurred during this function call—it may also mean the package was already installed.

FALSE indicates a failure to install or an invalid path. All diagnostic messages are printed via message() for user visibility.

Examples

## Not run: 
results <- install_package_local("pkg_source_path")
print(results)

## End(Not run)

test.assessr documentation built on March 3, 2026, 1:06 a.m.