Calculate the proportion of C, H and O in specified molecular formulas.
Arguments
- element_frequencies
a tibble containing element frequencies as returned by
elementFrequencies()
Examples
c('H2O','C12H22O11') %>%
elementFrequencies() %>%
CHOproportion()
#> # A tibble: 2 × 4
#> MF CHO total_atoms `CHO proportion`
#> <chr> <dbl> <dbl> <dbl>
#> 1 C12H22O11 45 45 1
#> 2 H2O 3 3 1