websearch_ecotox {ECOTOXr} | R Documentation |
Search and retrieve toxicity records from the online database
Description
Functions to search and retrieve records from the online database at
https://cfpub.epa.gov/ecotox/search.cfm.
Usage
websearch_ecotox(
fields = list_ecotox_web_fields(),
habitat = c("aquire", "terrestrial"),
verify_ssl = getOption("ECOTOXr_verify_ssl"),
...
)
list_ecotox_web_fields(...)
Arguments
fields |
A named |
habitat |
Use |
verify_ssl |
When set to |
... |
In case of In case of |
Details
The functions described here to search and retrieve records from the online database are experimental. This is because this feature is not formally supported by the EPA, and it may break in future iterations of the online database. The functions form an interface between R and the ECOTOX website and is therefore limited by its restrictions as described in the package documentation: ECOTOXr. The functions should therefore be used with caution.
Value
Returns named list
of dplyr::tibbles with search results. Results are unpolished and ‘as is’ returned by EPA's web service.
list_ecotox_web_fields()
returns a named list with fields that can be used in a web search of EPA's ECOTOX database, using
websearch_ecotox()
.
Note
IMPORTANT: when you plan to perform multiple adjacent searches (for instance in a loop), please insert a call to Sys.sleep()
.
This to avoid overloading the server and getting your IP address banned from the server.
Author(s)
Pepijn de Vries
See Also
Other online-functions:
download_ecotox_data()
,
get_ecotox_url()
Other search-functions:
search_ecotox()
Examples
if (interactive()) {
search_fields <-
list_ecotox_web_fields(
txAdvancedSpecEntries = "daphnia magna",
RBSPECSEARCHTYPE = "EXACT",
txAdvancedChemicalEntries = "benzene",
RBCHEMSEARCHTYPE = "EXACT")
search_results <- websearch_ecotox(search_fields)
}