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
.
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).
Examples
cf <- bb_config(local_file_root="/your/data/directory")
## see current settings
bb_settings(cf)
#> $wget_global_flags
#> $wget_global_flags$restrict_file_names
#> [1] "windows"
#>
#> $wget_global_flags$progress
#> [1] "dot:giga"
#>
#>
#> $target_s3_args
#> list()
#>
#> $http_proxy
#> NULL
#>
#> $ftp_proxy
#> NULL
#>
#> $local_file_root
#> [1] "/your/data/directory"
#>
#> $clobber
#> [1] 1
#>
## 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