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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Mar 21 07:36:57 CET 2023


Author: jedick
Date: 2023-03-21 07:36:57 +0100 (Tue, 21 Mar 2023)
New Revision: 782

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/man/mix.Rd
   pkg/CHNOSZ/man/util.plot.Rd
Log:
Restore examples that previously ran too long in R-devel/CRAN checks


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2023-03-21 04:10:46 UTC (rev 781)
+++ pkg/CHNOSZ/DESCRIPTION	2023-03-21 06:36:57 UTC (rev 782)
@@ -1,6 +1,6 @@
 Date: 2023-03-21
 Package: CHNOSZ
-Version: 2.0.0-1
+Version: 2.0.0-2
 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/mix.Rd
===================================================================
--- pkg/CHNOSZ/man/mix.Rd	2023-03-21 04:10:46 UTC (rev 781)
+++ pkg/CHNOSZ/man/mix.Rd	2023-03-21 06:36:57 UTC (rev 782)
@@ -68,12 +68,8 @@
 More examples are in the vignette \viglink{multi-metal}.
 }
 
-\examples{
-# Don't make all plots because it takes more than
-# 10 seconds on CRAN checks 20230313
-plot.all <- FALSE
-if(plot.all) opar <- par(no.readonly = TRUE)
-if(plot.all) par(mfrow = c(2, 2))
+\examples{\dontshow{opar <- par(no.readonly = TRUE)}
+par(mfrow = c(2, 2))
 # Define basis species with Fe and Cu
 basis(c("Fe+2", "Cu+", "hydrogen sulfide", "oxygen", "H2O", "H+"))
 xlab <- ratlab("Fe+2", "Cu+")
@@ -80,14 +76,14 @@
 # Calculate diagram for only Fe-bearing minerals
 species(c("pyrite", "pyrrhotite", "magnetite", "hematite"))
 aFe <- affinity("Fe+2" = c(0, 12), O2 = c(-40, -16), T = 400, P = 2000)
-dFe <- diagram(aFe, xlab = xlab, main = "Fe-S-O-H", plot.it = plot.all)
+dFe <- diagram(aFe, xlab = xlab, main = "Fe-S-O-H")
 # Calculate diagram for only Cu-bearing minerals
 species(c("covellite", "chalcocite", "tenorite", "cuprite"))
 aCu <- affinity(aFe)  # argument recall
-dCu <- diagram(aCu, xlab = xlab, main = "Cu-S-O-H", plot.it = plot.all)
+dCu <- diagram(aCu, xlab = xlab, main = "Cu-S-O-H")
 ### mash() diagram
 ac <- mash(dFe, dCu)
-diagram(ac, xlab = xlab, main = "Cu-Fe-S-O-H with mash()", plot.it = plot.all)
+diagram(ac, xlab = xlab, main = "Cu-Fe-S-O-H with mash()")
 ### rebalance() diagram
 ad <- rebalance(dFe, dCu)
 diagram(ad, xlab = xlab, balance = 1, main = "Cu-Fe-S-O-H with rebalance()")
@@ -94,6 +90,6 @@
 db <- describe.basis(3)
 leg <- lex(lTP(400, 2000), db)
 legend("bottomleft", legend = leg, bty = "n")
-if(plot.all) par(opar)}
+\dontshow{par(opar)}}
 
 \concept{Extended workflow}

Modified: pkg/CHNOSZ/man/util.plot.Rd
===================================================================
--- pkg/CHNOSZ/man/util.plot.Rd	2023-03-21 04:10:46 UTC (rev 781)
+++ pkg/CHNOSZ/man/util.plot.Rd	2023-03-21 06:36:57 UTC (rev 782)
@@ -119,8 +119,18 @@
 basis(c("H2S", "H2O", "H+", "e-"))
 species(c("HS-", "H2S", "HSO4-", "SO4-2"))
 a <- affinity(pH = c(0, 12), Eh = c(-1, 1), T = 200)
+opar <- par(mfrow = c(2, 2))
 diagram(a, grid = "both")
 title(main = 'diagram(a, grid = "both")')
+diagram(a, grid = "major")
+title(main = 'diagram(a, grid = "major")')
+diagram(a, grid = "minor")
+title(main = 'diagram(a, grid = "minor")')
+diagram(a, fill = "terrain")
+thermo.axis(grid = "major", col.grid = "slategray")
+title(main = 'thermo.axis(grid = "major")')
+par(thermo()$opar)
+par(opar)
 }
 
 \concept{Utility functions}



More information about the CHNOSZ-commits mailing list