configureBasiliskEnv: Configure client environments

View source: R/configureBasiliskEnv.R

configureBasiliskEnvR Documentation

Configure client environments

Description

Configure the basilisk environments in the configure file of client packages.

Usage

configureBasiliskEnv(src = "R/basilisk.R")

Arguments

src

String containing path to a R source file that defines one or more BasiliskEnvironment objects.

Details

This function is designed to be called in the configure file of client packages, triggering the construction of basilisk environments during package installation. It will only run if the BASILISK_USE_SYSTEM_DIR environment variable is set to "1".

We take a source file as input to avoid duplicated definitions of the BasiliskEnvironments. These objects are used in basiliskStart in the body of the package, so they naturally belong in R/; we then ask configure to pull out that file (named "basilisk.R" by convention) to create these objects during installation.

The source file in src should be executable on its own, i.e., you can source it without loading any other packages (beside basilisk, obviously). Non-BasiliskEnvironment objects can be created but are simply ignored in this function.

Value

One or more basilisk environments are created corresponding to the BasiliskEnvironment objects in src. A NULL is invisibly returned.

Author(s)

Aaron Lun

See Also

setupBasiliskEnv, which does the heavy lifting of setting up the environments.

Examples

## Not run: 
configureBasiliskEnv()

## End(Not run)


LTLA/basilisk documentation built on Feb. 6, 2024, 2:29 p.m.