Skip to contents

Extract the element frequencies from a molecular formula.

Usage

elementFrequencies(MF)

Arguments

MF

a vector of molecular formulas

Value

A tibble containing element frequencies.

Examples

elementFrequencies(c('H2O','C12H22O11'))
#> # A tibble: 2 × 4
#>   MF            H     O     C
#>   <chr>     <dbl> <dbl> <dbl>
#> 1 H2O           2     1    NA
#> 2 C12H22O11    22    11    12