options_econum: Manage EcoNum options

Description Usage Arguments Value Author(s) See Also Examples

View source: R/utilities.R

Description

Examine, set or retrieve EcoNum-specific options.

Usage

1
2
3
4
5
options_econum(opt)

get_opt_econum(key, default = NULL)

set_opt_econum(key, value)

Arguments

opt

A list with all EcoNum options to set. Optional and if not provided, a default list is created at first use of options_econum().

key

A character string with an option name.

default

Default (optional) value to return for the option, in case it is not defined.

value

Anything to set as an option in the list.

Value

For options_econum(), the whole list of options is returned. For the other functions, associated value (or default value) is returned.

Author(s)

Philippe Grosjean Philippe.Grosjean@umons.ac.be

See Also

EcoNumData, time_to_fingerprint()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Remote and local EcoNumData repositories
get_opt_econum("local_repos")
get_opt_econum("remote_repos")

# Default general metadata
get_opt_econum("def_project")
get_opt_econum("def_sample")
get_opt_econum("def_sample_date")
get_opt_econum("def_author")

# Get some non-existing EcoNum option
get_opt_econum("nokey", default = "my default value")
# Define it
set_opt_econum("nokey", "some data")
get_opt_econum("nokey", default = "my default value")
# Eliminate this key
set_opt_econum("nokey", NULL)
get_opt_econum("nokey", default = "my default value")

EcoNum/econum documentation built on May 9, 2020, 3:57 a.m.