searchFormulaWeb: Find web hits for a molecular formula

Description Usage Arguments Value See Also Examples

View source: R/oxy-from_formula.R

Description

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

Usage

1
2
3
4
5
6
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

1
2
3
4
5
## Not run: searchFormulaWeb(formulas = c("C6H12O6"),
search = c("pubchem", "chemspider",
"knapsack", "supernatural2",
"chemidplus"), detailed = TRUE)
## End(Not run)

MetaDBparse documentation built on May 3, 2021, 5:09 p.m.