bb_settings: Gets or sets a bowerbird configuration object's settings

View source: R/config.R

bb_settingsR Documentation

Gets or sets a bowerbird configuration object's settings

Description

Gets or sets a bowerbird configuration object's settings. These are repository-wide settings that are applied to all data sources added to the configuration. Use this function to alter the settings of a configuration previously created using bb_config.

Usage

bb_settings(config)

bb_settings(config) <- value

Arguments

config

bb_config: a bowerbird configuration (as returned by bb_config)

value

list: new values to set

Details

Note that an assignment along the lines of bb_settings(cf) <- new_settings replaces all of the settings in the configuration with the new_settings. The most common usage pattern is to read the existing settings, modify them as needed, and then rewrite the whole lot back into the configuration object (as per the examples here).

Value

named list

See Also

bb_config

Examples

cf <- bb_config(local_file_root="/your/data/directory")

## see current settings
bb_settings(cf)

## add an http proxy
sets <- bb_settings(cf)
sets$http_proxy <- "http://my.proxy"
bb_settings(cf) <- sets

## change the current local_file_root setting
sets <- bb_settings(cf)
sets$local_file_root <- "/new/location"
bb_settings(cf) <- sets


ropensci/bowerbird documentation built on March 10, 2024, 8:10 a.m.