Learn R Programming

ECOTOXr (version 1.1.1)

get_ecotox_sqlite_file: The local path to the ECOTOX database (directory or sqlite file)

Description

[Stable] Obtain the local path to where the ECOTOX database is (or will be) placed.

Usage

get_ecotox_sqlite_file(path = get_ecotox_path(), version)

get_ecotox_path()

Value

Returns a character string of the path. get_ecotox_path will return the default directory of the database. get_ecotox_sqlite_file will return the path to the sqlite file when it exists.

Arguments

path

When you have a copy of the database somewhere other than the default directory (get_ecotox_path()), you can provide the path here.

version

A character string referring to the release version of the database you wish to locate. It should have the same format as the date in the EPA download link, which is month, day, year, separated by underscores ("%m_%d_%Y"). When missing, the most recent available copy is selected automatically.

Author

Pepijn de Vries

Details

It can be useful to know where the database is located on your disk. This function returns the location as provided by rappdirs::app_dir(), or as specified by you using options(ECOTOXr_path = "mypath").

Examples

Run this code
get_ecotox_path()

if (FALSE) {
## This will only work if a local database exists:
get_ecotox_sqlite_file()
}

Run the code above in your browser using DataLab