Learn R Programming

minval (version 0.4)

unbalanced: Evaluates if a stoichiometric reaction is mass-balanced

Description

This function evaluates if a stoichiometric reaction is mass-unbalanced. if TRUE, an option to return molecular formula is included

Usage

unbalanced(reaction,show.formulas)

Arguments

reaction
A stoichiometric reaction with the following format L-Glutamate[c] <=> CO2[c] + 4-Aminobutanoate[c]
show.formulas
A logical value (TRUE/FALSE) if molecular formula should be showed for unbalanced reactions

Examples

Run this code
## For a specific reaction
unbalanced("Phosphoenolpyruvate[c_n] => ATP[c_n] + Pyruvate[c_n] + Water[c_n]")
# [1] TRUE

unbalanced("Phosphoenolpyruvate[c_n] => ATP[c_n] + Pyruvate[c_n]", show.formulas = TRUE)
#      [,1]                                                                          
# [1,] "Phosphoenolpyruvate[c_n] => ATP[c_n] + Pyruvate[c_n]"
#      [,2]                                                               
# [1,] "1 C3H4O6P => 1 C10H16N5O13P3 + 1 C3H3O3"

Run the code above in your browser using DataLab