get-set_database: Extracts or assign the path of the database

get_databaseR Documentation

Extracts or assign the path of the database

Description

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 signature 'rtoi'
get_database(x)

## S4 method for signature 'missing'
get_database()

set_database(x, ...)

## S4 method for signature 'rtoi'
set_database(x, value)

## S4 method for signature 'character'
set_database(x)

Arguments

x

an rtoi object.

...

additional arguments.

value

character argument. The value for change the database directory of x.

Value

the database path of an rtoi

Examples

## Not run: 
# 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")

## End(Not run)

rsat documentation built on March 18, 2022, 5:40 p.m.