Learn R Programming

webchem (version 0.1.0.0)

pp_query: Query SRC PHYSPROP Database

Description

Query SRCs PHYSPROP Database. The PHYSPROP database contains chemical structures, names and physical properties for over 41,000 chemicals. Physical properties collected from a wide variety of sources include experimental, extrapolated and estimated values. For more information see http://www.srcinc.com/what-we-do/environmental/scientific-databases.html#physprop.

Usage

pp_query(cas, verbose = TRUE)

Arguments

cas
character; A CAS number to query.
verbose
logical; print message during processing to console?

Value

A list of lists with 5 entries: cas (CAS-Number), cname (Chemical Name), mw (Molecular weigth), prop (Properties) and source url. prop is a data.frame, with variables, value, unit, temp, type (see note) and ref (see note).

Examples

Run this code
## Not run: 
# pp_query('50-00-0')
# out <- pp_query(c('50-00-0', '79622-59-6', 'xxxxx'))
# out
# 
# # extract lop-P
# sapply(out, function(y){
#  if (length(y) == 1 && is.na(y))
#    return(NA)
#  y$prop$value[y$prop$variable == 'Log P (octanol-water)']
#  })
# ## End(Not run)

Run the code above in your browser using DataLab