sort.mol: Sort molecule, reaction objects

Description Usage Arguments Value Examples

View source: R/molecule.R

Description

Sorts mol objects by alphabetic character representation, and reaction objects by decreasing coefficient. This is probably useful for comparison.

Usage

1
2
## S3 method for class 'mol'
sort(x, decreasing = FALSE, ...)

Arguments

x

An object

decreasing

Should the list be sorted

...

Passed to order

Value

An object with the same class as x

Examples

1
2
sort(mol("H2O", "Ar", "H2"))
sort(as_reaction("2H2O + 4H+ = 2H2O + 4H+"))

paleolimbot/chemr documentation built on Sept. 11, 2021, 2:02 p.m.