Format a molecular formula as a list of all elements and their counts in Hill order.
# S3 method for mol_form format(x, prettify = FALSE, ...)
x | Molecular formula to be formatted |
---|---|
prettify | If |
... | Further arguments passed to or from other methods. |
A character representation of the molecular formula.
#> [1] "H-3 N-1"#> [1] "H\033[31m-3\033[39m N\033[31m-1\033[39m"#> [1] "H O3 P"#> [1] "H O\033[34m3\033[39m P"