Global Settings

Core default behaviors of functions in the package can be viewed or changed globally through the r rdoc_url("settings()") function. The function accepts one or more character names of settings to view, name = value pairs giving the values of settings to change, a vector of these, or "reset" to restore all package defaults. Calls with no arguments will display the current values of all. Settings may also be supplied as a single unnamed argument which is a named list. Partial matching of setting names is supported. The setting value is returned if only one is specified to view. Otherwise, a list is returned with the values of specified settings as they existed prior to any requested changes. Such a list can be passed as an argument to settings to restore their values.

## Package library
library(MachineShop)

## View all current settings
settings()

## Change settings
presets <- settings(control = "BootControl", grid = 10)

## View one setting
settings("control")

## View multiple settings
settings("control", "grid")

## Restore the previous settings
settings(presets)


brian-j-smith/MachineShop documentation built on Sept. 22, 2023, 10:01 p.m.