extr_pprtv | R Documentation |
Extracts data for specified identifiers (CASRN or chemical names) from the EPA's Provisional Peer-Reviewed Toxicity Values (PPRTVs) database. The function retrieves and processes data, with options to use cached files or force a fresh download.
extr_pprtv(
ids,
search_type = "casrn",
verbose = TRUE,
force = TRUE,
get_all = FALSE
)
ids |
Character vector of identifiers to search (e.g., CASRN or chemical names). |
search_type |
Character string specifying the type of identifier: "casrn"
or "name".
Default is "casrn". If |
verbose |
Logical indicating whether to display progress messages. Default is TRUE. |
force |
Logical indicating whether to force a fresh download of the database. Default is TRUE. |
get_all |
Logical. If TRUE ignore all the other ignore |
A data frame with extracted information matching the specified identifiers, or NULL if no matches are found.
with_extr_sandbox({ # this is to write on tempdir as for CRAN policies
# Extract data for a specific CASRN
extr_pprtv(ids = "107-02-8", search_type = "casrn", verbose = TRUE)
# Extract data for a chemical name
extr_pprtv(
ids = "Acrolein", search_type = "name", verbose = TRUE,
force = FALSE
)
# Extract data for multiple identifiers
extr_pprtv(
ids = c("107-02-8", "79-10-7", "42576-02-3"),
search_type = "casrn",
verbose = TRUE,
force = FALSE
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.