bb_data_sources: Gets or sets a bowerbird configuration object's data sources

View source: R/config.R

bb_data_sourcesR Documentation

Gets or sets a bowerbird configuration object's data sources

Description

Gets or sets the data sources contained in a bowerbird configuration object.

Usage

bb_data_sources(config)

bb_data_sources(config) <- value

Arguments

config

bb_config: a bowerbird configuration (as returned by bb_config)

value

data.frame: new data sources to set (e.g. as returned by bb_example_sources)

Details

Note that an assignment along the lines of bb_data_sources(cf) <- new_sources replaces all of the sources in the configuration with the new_sources. If you wish to modify the existing sources then read them, modify as needed, and then rewrite the whole lot back into the configuration object.

Value

a tibble with columns as specified by bb_source

See Also

bb_config, bb_source, bb_example_sources

Examples

## create a configuration and add data sources
cf <- bb_config(local_file_root="/your/data/directory")
cf <- bb_add(cf,bb_example_sources())

## examine the sources contained in cf
bb_data_sources(cf)

## replace the sources with different ones
## Not run: 
bb_data_sources(cf) <- new_sources

## End(Not run)


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