R – Total sum of all named items in list elements I am attempting to sum the number of atoms for each element in the chemical_formula vector: