if (FALSE) {
## the code below requires SQLite DB in the working directory
## which can be downloaded with eppo_database_download function
test_names <- eppo_names_tables(c("Xylella", "Poacea"))
# get data on naming
eppo_tabletools_names(test_names)
## below functions connect to EPPO Global Database or EPPO Global Services
## they need connection to internet.
# get data on distribution
eppo_tabletools_distri(test_names)
# you can also get data using eppocodes directly
eppo_tabletools_distri(raw_eppocodes = c("XYLEFA", "1GRAF"),
use_raw_codes = TRUE)
## below functions, beside internet connection require also valid token that
## can be obtained after free of charge registration at EPPO Data Services
# first create token variable:
create_eppo_token("paste_your_token_here")
# then use result of eppo_names_tables or raw eppocodes to query REST API
# get data on hosts
eppo_tabletools_hosts(test_names, eppo_token)
eppo_tabletools_hosts(token = eppo_token,
raw_eppocodes = c("XYLEFA", "1GRAF"),
use_raw_codes = TRUE)
# get data on categorization
eppo_tabletools_cat(test_names, eppo_token)
eppo_tabletools_cat(token = eppo_token,
raw_eppocodes = c("XYLEFA", "1GRAF"),
use_raw_codes = TRUE)
# get data on taxonomy
eppo_tabletools_taxo(test_names, eppo_token)
eppo_tabletools_taxo(token = eppo_token,
raw_eppocodes = c("XYLEFA", "1GRAF"),
use_raw_codes = TRUE)
# get data on pests
eppo_tabletools_pests(test_names, eppo_token)
eppo_tabletools_pests(token = eppo_token,
raw_eppocodes = c("XYLEFA", "1GRAF"),
use_raw_codes = TRUE)
}
Run the code above in your browser using DataLab