Options to manage the default configuration of datasets and selectors.

reset_options(verbose = TRUE)

set_default_dataset_dir(path)

get_default_dataset_dir()

set_default_dataset_name(name)

get_default_dataset_name()

set_default_selector(selector)

get_default_selector()

Arguments

verbose

Boolean indicating whether to print additional information.

path

Character. Representing a directory path.

name

Character. Representing the name of the option.

selector

An object of class SelectorTB.

Value

  • get_...: The value of the requested option.

  • set_...: The value assigned, invisibly.

  • reset_options: NULL invisibly.

Examples

# Resetting options
reset_options()
#> Reset the default options to: 
#> - location for datasets:  /tmp/RtmpSJddLH/data 
#> - name for the datasets:  mwlef 
#> - selector: NULL

# Working with default dataset directory
get_default_dataset_dir()
#> [1] "/tmp/RtmpSJddLH/data"
set_default_dataset_dir("/tmp/my_data")

# Working with default dataset name
get_default_dataset_name()
#> [1] "mwlef"
set_default_dataset_name("my_dataset")

# Working with default selector
sel <- init_selector(source = "GitHub", owner = "test", repo = "test")
set_default_selector(sel)
get_default_selector()
#> There is 1 selector. 
#> 
#> Selector n°1 
#> source: GitHub 
#> repo: test 
#> owner: test