eppo_tabletools {pestr} | R Documentation |
EPPO table manipulation tools
Description
eppo_tabletools_names
creates tables with names – preferred, common
and synonyms – of pests. It is particularly useful for creating whole table
with eppo_table_full, otherwise it might be more informative to use
eppo_names_tables which provides additional information for your
query.
eppo_tabletools_hosts
creates tables with hosts of pests.
eppo_tabletools_cat
creates tables with categorization of pests.
eppo_tabletools_taxo
creates tables with taxonomy of pests/hosts.
eppo_tabletools_distri
creates tables with distribution of pests.
eppo_tabletools_pests
creates table with pests of host.
All functions return both long table and compact, human friendly table.
Usage
eppo_tabletools_names(names_tables)
eppo_tabletools_hosts(
names_tables = NULL,
token,
raw_eppocodes = NULL,
use_raw_codes = FALSE
)
eppo_tabletools_cat(
names_tables = NULL,
token,
raw_eppocodes = NULL,
use_raw_codes = FALSE
)
eppo_tabletools_taxo(
names_tables = NULL,
token,
raw_eppocodes = NULL,
use_raw_codes = FALSE
)
eppo_tabletools_distri(
names_tables = NULL,
raw_eppocodes = NULL,
use_raw_codes = FALSE
)
eppo_tabletools_pests(
names_tables = NULL,
token,
raw_eppocodes = NULL,
use_raw_codes = FALSE
)
Arguments
names_tables |
A list of tables created via |
token |
An object containing EPPO API token created via
|
raw_eppocodes |
A character vector of eppocodes. Use with caution, and ONLY when sure that provided eppocodes are correct. |
use_raw_codes |
logical. Default FALSE. Set TRUE if you want to provide eppocodes directly. |
Value
List containing two data frames. First is in a long format, and each row contains synonyms and names in other languages in respect to preferred names. The second data frame contains coerced synonyms and other names to single cell for each preferred name.
See Also
EPPO Data services https://data.eppo.int/ and EPPO Global Database https://gd.eppo.int/
Examples
## Not run:
## 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)
## End(Not run)