bb_config: Initialize a bowerbird configuration

View source: R/config.R

bb_configR Documentation

Initialize a bowerbird configuration

Description

The configuration object controls the behaviour of the bowerbird synchronization process, run via bb_sync(my_config). The configuration object defines the data sources that will be synchronized, where the data files from those sources will be stored, and a range of options controlling how the synchronization process is conducted. The parameters provided here are repository-wide settings, and will affect all data sources that are subsequently added to the configuration.

Usage

bb_config(
  local_file_root,
  wget_global_flags = list(restrict_file_names = "windows", progress = "dot:giga"),
  http_proxy = NULL,
  ftp_proxy = NULL,
  clobber = 1
)

Arguments

local_file_root

string: location of data repository on local file system

wget_global_flags

list: wget flags that will be applied to all data sources that call bb_wget. These will be appended to the data-source-specific wget flags provided via the source's method argument

http_proxy

string: URL of HTTP proxy to use e.g. 'http://your.proxy:8080' (NULL for no proxy)

ftp_proxy

string: URL of FTP proxy to use e.g. 'http://your.proxy:21' (NULL for no proxy)

clobber

numeric: 0=do not overwrite existing files, 1=overwrite if the remote file is newer than the local copy, 2=always overwrite existing files

Details

Note that the local_file_root directory need not actually exist when the configuration object is created, but when bb_sync is run, either the directory must exist or create_root=TRUE must be passed (i.e. bb_sync(...,create_root=TRUE)).

Value

configuration object

See Also

bb_source, bb_sync

Examples

## Not run: 
  cf <- bb_config("/my/file/root") %>%
    bb_add(bb_example_sources())

  ## save to file
  saveRDS(cf,file="my_config.rds")
  ## load previously saved config
  cf <- readRDS(file="my_config.rds")

## End(Not run)


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