Learn R Programming

MetaDBparse (version 2.0.0)

searchFormulaWeb: Find web hits for a molecular formula

Description

Takes molecular formula, and scours PubChem and/or ChemSpider for compounds matching that formula.

Usage

searchFormulaWeb(
  formulas,
  search = c("pubchem", "chemspider", "knapsack", "supernatural2", "chemidplus"),
  apikey = "",
  detailed = TRUE
)

Arguments

formulas

Character vector of formulas to check

search

Which databases to check?, Default: c("PubChem", "ChemSpider")

apikey

API key for ChemSpider

detailed

Find detailed results? Not just the compound name, but other associated info?, Default: FALSE

Value

Data table with match results.

See Also

pbapply as.data.table,rbindlist check_chemform fn str_extract,str_match readHTMLTable list.clean read_json POST,add_headers,content_type,content,GET fromJSON

Examples

Run this code
# NOT RUN {
searchFormulaWeb(formulas = c("C6H12O6"),
search = c("pubchem", "chemspider",
"knapsack", "supernatural2",
"chemidplus"), detailed = TRUE)
# }

Run the code above in your browser using DataLab