[CHNOSZ-commits] r527 - in pkg/CHNOSZ: . man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jun 11 02:25:25 CEST 2020


Author: jedick
Date: 2020-06-11 02:25:25 +0200 (Thu, 11 Jun 2020)
New Revision: 527

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/man/thermo.Rd
Log:
thermo.Rd: add "adding an element" example


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2020-06-11 00:07:11 UTC (rev 526)
+++ pkg/CHNOSZ/DESCRIPTION	2020-06-11 00:25:25 UTC (rev 527)
@@ -1,6 +1,6 @@
 Date: 2020-06-10
 Package: CHNOSZ
-Version: 1.3.6-4
+Version: 1.3.6-5
 Title: Thermodynamic Calculations and Diagrams for Geochemistry
 Authors at R: c(
     person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"),

Modified: pkg/CHNOSZ/man/thermo.Rd
===================================================================
--- pkg/CHNOSZ/man/thermo.Rd	2020-06-11 00:07:11 UTC (rev 526)
+++ pkg/CHNOSZ/man/thermo.Rd	2020-06-11 00:25:25 UTC (rev 527)
@@ -260,6 +260,19 @@
 # formulas of ten random species
 n <- nrow(thermo()$obigt)
 thermo()$obigt$formula[runif(10)*n]
+
+## adding an element
+old <- thermo()$element
+# element symbol, state, source (can be anything),
+# mass, entropy, and number in compound
+Xprops <- data.frame(element = "X", state = "cr",
+  source = "user", mass = 100, s = 100, n = 1)
+new <- rbind(old, Xprops)
+thermo(element = new)
+# now "X" is recognized as an element in other functions
+mass("X10")
+# restore default settings to remove X
+reset()
 }
 
 \references{



More information about the CHNOSZ-commits mailing list