Skip to contents

Calculate the proportion of C, H and O in specified molecular formulas.

Usage

CHOproportion(element_frequencies)

Arguments

element_frequencies

a tibble containing element frequencies as returned by elementFrequencies()

Value

A tibble containing the CHO proportions for the specified element frequencies.

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