[CHNOSZ-commits] r636 - in pkg/CHNOSZ: . vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Feb 23 08:15:01 CET 2021


Author: jedick
Date: 2021-02-23 08:15:00 +0100 (Tue, 23 Feb 2021)
New Revision: 636

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/vignettes/OBIGT.bib
   pkg/CHNOSZ/vignettes/multi-metal.Rmd
Log:
Add references for thermodynamic data to multi-metal.Rmd


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2021-02-21 01:12:09 UTC (rev 635)
+++ pkg/CHNOSZ/DESCRIPTION	2021-02-23 07:15:00 UTC (rev 636)
@@ -1,6 +1,6 @@
-Date: 2021-02-21
+Date: 2021-02-23
 Package: CHNOSZ
-Version: 1.4.0-5
+Version: 1.4.0-6
 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/vignettes/OBIGT.bib
===================================================================
--- pkg/CHNOSZ/vignettes/OBIGT.bib	2021-02-21 01:12:09 UTC (rev 635)
+++ pkg/CHNOSZ/vignettes/OBIGT.bib	2021-02-23 07:15:00 UTC (rev 636)
@@ -470,7 +470,7 @@
   number    = {7435},
   series    = {Report of Investigations},
   pages     = {10},
-  url       = {https://www.worldcat.org/oclc/14154292},
+  url       = {https://hdl.handle.net/2027/mdp.39015078533158},
 }
 
 @Article{PK95,
@@ -720,9 +720,9 @@
   journal   = {Geochimica et Cosmochimica Acta},
   title     = {{C}alculation of the thermodynamic and transport properties of aqueous species at high pressures and temperatures: {C}orrelation algorithms for ionic species and equation of state predictions to 5 kb and 1000°{C}},
   year      = {1988},
-  volume    = {52},
   number    = {8},
   pages     = {2009--2036},
+  volume    = {52},
   doi       = {10.1016/0016-7037(88)90181-0},
 }
 
@@ -738,14 +738,14 @@
 }
 
 @Article{SHS89,
-  author        = {Shock, Everett L. and Helgeson, Harold C. and Sverjensky, Dimitri A.},
-  journal       = {Geochimica et Cosmochimica Acta},
-  title         = {{C}alculation of the thermodynamic and transport properties of aqueous species at high pressures and temperatures: {S}tandard partial molal properties of inorganic neutral species},
-  year          = {1989},
-  volume        = {53},
-  number        = {9},
-  pages         = {2157--2183},
-  doi           = {10.1016/0016-7037(89)90341-4},
+  author    = {Shock, Everett L. and Helgeson, Harold C. and Sverjensky, Dimitri A.},
+  journal   = {Geochimica et Cosmochimica Acta},
+  title     = {{C}alculation of the thermodynamic and transport properties of aqueous species at high pressures and temperatures: {S}tandard partial molal properties of inorganic neutral species},
+  year      = {1989},
+  number    = {9},
+  pages     = {2157--2183},
+  volume    = {53},
+  doi       = {10.1016/0016-7037(89)90341-4},
 }
 
 @Article{SK93,
@@ -955,14 +955,14 @@
 }
 
 @Article{Ber88,
-  author        = {Berman, R. G.},
-  journal       = {Journal of Petrology},
-  title         = {{I}nternally-consistent thermodynamic data for minerals in the system {N}a$_2${O}--{K}$_2${O}--{C}a{O}--{M}g{O}--{F}e{O}--{F}e$_2${O}$_3$--{A}l$_2${O}$_3$--{S}i{O}$_2$--{T}i{O}$_2$--{H}$_2${O}--{CO}$_2$},
-  year          = {1988},
-  volume        = {29},
-  number        = {2},
-  pages         = {445--522},
-  doi           = {10.1093/petrology/29.2.445},
+  author    = {Berman, R. G.},
+  journal   = {Journal of Petrology},
+  title     = {{I}nternally-consistent thermodynamic data for minerals in the system {N}a$_2${O}--{K}$_2${O}--{C}a{O}--{M}g{O}--{F}e{O}--{F}e$_2${O}$_3$--{A}l$_2${O}$_3$--{S}i{O}$_2$--{T}i{O}$_2$--{H}$_2${O}--{CO}$_2$},
+  year      = {1988},
+  number    = {2},
+  pages     = {445--522},
+  volume    = {29},
+  doi       = {10.1093/petrology/29.2.445},
 }
 
 @Misc{SPRONS92,

Modified: pkg/CHNOSZ/vignettes/multi-metal.Rmd
===================================================================
--- pkg/CHNOSZ/vignettes/multi-metal.Rmd	2021-02-21 01:12:09 UTC (rev 635)
+++ pkg/CHNOSZ/vignettes/multi-metal.Rmd	2021-02-23 07:15:00 UTC (rev 636)
@@ -8,7 +8,7 @@
   %\VignetteIndexEntry{Diagrams with multiple metals}
   %\VignetteEngine{knitr::rmarkdown}
   %\VignetteEncoding{UTF-8}
-bibliography: vig.bib
+bibliography: [vig.bib, OBIGT.bib]
 csl: elementa.csl
 ---
 <style>
@@ -494,6 +494,9 @@
 dFe <- diagram(mFe$A.species, lwd = 0, names = FALSE)
 
 # Cu-bearing minerals
+FeCu.cr <- c("chalcopyrite", "bornite")
+Cu.cr <- c("copper", "cuprite", "tenorite", "chalcocite", "covellite")
+FeCu.abbrv <- c("Ccp", "Bn", "Cu", "Cpr", "Tnr", "Cct", "Cv")
 species(c(FeCu.cr, Cu.cr))
 # Add aqueous species 20210220
 iCu.aq <- retrieve("Cu", c("S", "O", "H"), "aq")
@@ -558,6 +561,25 @@
 ```{r stack2, echo = FALSE, results = "hide", message = FALSE, fig.width = 6, fig.height = 5, out.width = "75%", fig.align = "center", pngquant = pngquant}
 ```
 
+After running the code to make this diagram, we can list the reference keys for the minerals and aqueous species.
+
+```{r stack2.refs, message = FALSE}
+minerals <- list(Fe.cr = Fe.cr, Cu.cr = Cu.cr, FeCu.cr = FeCu.cr)
+aqueous <- list(S.aq = S.aq, Fe.aq = Fe.aq, Cu.aq = Cu.aq)
+allspecies <- c(minerals, aqueous)
+iall <- lapply(allspecies, info)
+allkeys <- lapply(iall, function(x) thermo.refs(x)$key)
+allkeys
+```
+
+The next code chunk prepends `@` to the reference keys and uses the chunk option [`results = 'asis'`](https://bookdown.org/yihui/rmarkdown-cookbook/results-asis.html) to insert the citations into the R Markdown document in chronological order.
+
+```{r stack2.cite, results = "asis"}
+allyears <- lapply(iall, function(x) thermo.refs(x)$year)
+o <- order(unlist(allyears))
+cat(paste(paste0("@", unique(unlist(allkeys)[o])), collapse = "; "))
+```
+
 ## Mixing 2
 
 The previous diagram shows a stability boundary between chalcopyrite and bornite but does not identify the stable *assemblages* that contain these minerals.



More information about the CHNOSZ-commits mailing list