Learn R Programming

rlang (version 1.1.2)

global_prompt_install: Prompt user to install missing packages

Description

When enabled, packageNotFoundError thrown by loadNamespace() cause a user prompt to install the missing package and continue without interrupting the current program.

This is similar to how check_installed() prompts users to install required packages. It uses the same install strategy, using pak if available and install.packages() otherwise.

Usage

global_prompt_install(enable = TRUE)

Arguments

enable

Whether to enable or disable global handling.