Learn R Programming

webchem (version 0.0.5.0)

ppdb_query: Query the ppdb for information

Description

This function queries the PPDB http://sitem.herts.ac.uk/aeru/iupac/search.htm for information.

Usage

ppdb_query(cas, verbose = TRUE, index = NULL)

Arguments

cas
character; CAS number to query.
verbose
logical; print message during processing to console?
index
A index object, as created by ppdb_buildidx. If NULL (default), the index shipped with webchem is used ppdb_idx.

Value

  • A list of 11 data.frames : ec_regulation, approved_in, general, parents, fate, deg, soil, metab, etox, names and source_url.

    See also http://sitem.herts.ac.uk/aeru/iupac/docs/Background_and_Support.pdf for more information on the data

References

Lewis, Kathleen A., John Tzilivakis, Douglas J. Warner, and Andrew Green 2016. An International Database for Pesticide Risk Assessments and Management. Human and Ecological Risk Assessment: An International Journal

Examples

Run this code
# might fail if Server is not available
gly <- ppdb_query('1071-83-6')
gly$approved_in

# handle multiple CAS
 cas <- c('1071-83-6', '50-00-0')
 # check if these compounds are approved in germany
 foo <- function(y) {
   # query cas
   q <- ppdb_query(y)
   # extract status for germany
   q$approved_in$status[q$approved_in$country == 'DE']
 }
 sapply(cas, foo)

Run the code above in your browser using DataLab