Counts the number of elements in molecules based on their chemical formulas.
Value
A numeric matrix with named columns for individual elements. Rows contain the counts of elements for each formula in the same order as formulas were provided to the function.
Examples
countElements(c("C6H12O6","C48H72CoN11O8","HCOOH"))
#> C H O Co N
#> [1,] 6 12 6 0 0
#> [2,] 48 72 8 1 11
#> [3,] 1 2 2 0 0