eppo_database: EPPO Data Services Database connection tools

eppo_databaseR Documentation

EPPO Data Services Database connection tools

Description

[Stable] 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)

mczyzj/pestr documentation built on Feb. 27, 2024, 8:58 p.m.