Extracts the path to the database from an rtoi/package environment. If both, environment and rtoi database are defined the rtoi database is used.
Usage
get_database(x)
# S4 method for rtoi
get_database(x)
# S4 method for missing
get_database()
set_database(x, ...)
# S4 method for rtoi
set_database(x, value)
# S4 method for character
set_database(x)
Arguments
- x
an rtoi object.
- ...
additional arguments.
- value
character argument. The value for change the database directory of x.
Examples
if (FALSE) {
# load example rtoi
file.copy(from=system.file("ex/Navarre",package="rsat"),
to=tempdir(),
recursive = TRUE)
navarre <- read_rtoi(file.path(tempdir(),"Navarre"))
# get the databse used by navarre
get_database(navarre)
# set the a new database path
set_database(navarre,"new_path")
# get the database used by rsat by default
get_database()
# set the a new database path for the entire environment
set_database("new_path")
}