Learn R Programming

webchem (version 0.4.0)

aw_query: Query http://www.alanwood.net/pesticides

Description

Query Alan Woods Compendium of Pesticide Common Names http://www.alanwood.net/pesticides

Usage

aw_query(query, type = c("commonname", "cas"), verbose = TRUE, idx = NULL)

Arguments

query

character; search string

type

character; type of input ('cas' or 'commonname')

verbose

logical; print message during processing to console?

idx

data.frame; index to use. If NULL (default) the internal index aw_idx is used. To rebuild the index use build_aw_idx.

Value

A list of eight entries: common-name, status, preferredd IUPAC Name, IUPAC Name, cas, formula, activity, subactivity, inchikey, inchi and source url.

Examples

Run this code
# NOT RUN {
aw_query('Fluazinam', type = 'commonname')
out <- aw_query(c('Fluazinam', 'Diclofop'), type = 'com')
out
# extract subactivity from object
sapply(out, function(y) y$subactivity[1])

# use CAS-numbers
aw_query("79622-59-6", type = 'cas')
# }

Run the code above in your browser using DataLab