Learn R Programming

MetaDBparse (version 2.0.0)

searchFormula: Find matches based on molecular formula

Description

Goes through database of choice (base database) and retrieves hits that have the molecular formula of interest.

Usage

searchFormula(formula, charge, outfolder, base.dbname)

Arguments

formula

Molecular formula (should be checked by enviPat::check_chemform first!)

charge

Charge of formula

outfolder

Which folder are your databases stored in?

base.dbname

Base database name (without .db suffix)

Value

Data table with compounds with this molecular formula and the other available information

See Also

SQLite rbindlist

Examples

Run this code
# NOT RUN {
 
# }
# NOT RUN {
myFolder = tempdir()
# }
# NOT RUN {
 
# }
# NOT RUN {
buildBaseDB(outfolder = myFolder, "lmdb", test = TRUE)
# }
# NOT RUN {
 
# }
# NOT RUN {
searchFormula(formula = c("C7H11N3O2"), charge = 0,
 outfolder = myFolder, base.dbname = c("lmdb"))
# }

Run the code above in your browser using DataLab