eppo_database {pestr} | R Documentation |
EPPO Data Services Database connection tools
Description
eppo_database_check
checks if there is a file eppocodes.sqlite
and informs user if it is outdated and should be downloaded.
eppo_database_download
downloads database in SQLite format directly.
The downloaded file is zip archive. On Linux this database will be
extracted automatically. On Windows user will need to extract the file
manually.
eppo_database_connect
allows user to connect to SQLite database
downloaded from EPPO Data Services.
Usage
eppo_database_check(filepath = getwd(), filename = "eppocodes.sqlite")
eppo_database_download(filepath = getwd())
eppo_database_connect(filepath = getwd(), filename = "eppocodes.sqlite")
Arguments
filepath |
A string with path where eppocodes.sqlite file is stored. By default it points to working directory. |
filename |
A string with name of the file. By default it takes name eppocodes.sqlite. |
Value
Checks if database file exist in directory, if it is outdated, and establishes SQLite database connection
Manual download
If you will, you can download database directly from EPPO Data Services https://data.eppo.int
Examples
## Not run:
#to check if the db file exist in the directory (default working directory)
eppo_database_check(filepath = getwd())
#to download EPPO SQLite database into directory (default working directory).
#If you are Windows user, after download finishes you will need to unzip file
#manualy.
eppo_database_download(filepath = getwd())
#prior to use functions that check pest names in SQLite database,
#you need to set up connection to SQLite database. Doing so is
#straightforward with function below (once per sesion):
eppo_connection <- eppo_database_connect(filepath = getwd(),
filename = "eppocodes.sqlite")
## End(Not run)