The goal of chemcalculatorrr is R package useful for chemistry for the purpose of calculating chemical formular mass in g/mol. The pacakage is designed to perform the same function as the python package. The mole allows scientists to calculate the number of elementary entities (usually atoms or molecules) in a certain mass of a given substance. Also, the mass of one mole of a substance is equal to that substance’s molecular weight; as for instance, the mean molecular weight of water is 18.015 atomic mass units (amu), so one mole of water weighs 18.015 grams. This property simplifies many chemical computations. This R package will be helpful to easily calculate the chemical formula mass, convert moles to grams and vice versa, and lastly calculate the percentage mass for the atomic nature of the elements in chemistry.
This package contains three functions. Each function will have it’s own required and optional arguments.
compute_mass
: Calculate the mass of the atoms or chemical formula for the input chemical formula.moles_grams_converter
: Convert moles to grams and convert grams to moles.percent_mass
: Calculate percentage mass for the desired atom or molecule.You can install the released version of chemcalculatorrr from with:
devtools::install_github("UBC-MDS/chemcalculatorrr")
To our knowledge, there is no general-purpose library for calculating chemical formula mass in g/mol in the R ecosystem. We believe that chemcalculatorrr
will provide some useful functionality to know how to calculate moles, and provide a grams to moles calculator, or even a moles to grams calculator. With our moles to grams converter, you can seamlessly convert between mass, molecular weight and moles.
chemcalculatorrr
can be used as follows:
library(chemcalculatorrr)
compute_mass("H2O")
library(chemcalculatorrr)
moles_grams_converter("H2O", 0.05555, "moles")
library(chemcalculatorrr)
percent_mass("H2O", "O")
The help file can be viewed by:
?chemcalculatorrr::compute_mass
?chemcalculatorrr::moles_grams_converter
?chemcalculatorrr::percent_mass
Contributor Name | GitHub Username |
---|---|
Kingslin Lv | Kingslin0810 |
Joyce Wang | jo4356 |
Allyson Stoll | datallurgy |
We welcome and recognize all contributions. Please find the guide for contribution in Contributing Document.