Learn R Programming

IDSL.UFA (version 2.0)

molecular_formula_library_generator: Molecular Formula Database Producer

Description

This function generates an efficient database for molecular formula matching against a database.

Usage

molecular_formula_library_generator(entire_molecular_formulas)

Value

A vector of frequency of molecular formulas in the database.

Arguments

entire_molecular_formulas

A string vector of molecular formulas (redundancy is allowed)

Examples

Run this code
entire_molecular_formulas <- c("C2H6O", "C2H6O", "C2H6O", "C2H6O", "CH4O", "CH4O",
"CH4O", "NH4", "C6H12O6")
db <- molecular_formula_library_generator(entire_molecular_formulas)
freq <- db[c("C6H12O6", "CH4O")]

Run the code above in your browser using DataLab