[CHNOSZ-commits] r62 - in pkg/CHNOSZ: . inst man vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Jan 12 16:17:44 CET 2014


Author: jedick
Date: 2014-01-12 16:17:43 +0100 (Sun, 12 Jan 2014)
New Revision: 62

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/inst/CHECKLIST
   pkg/CHNOSZ/inst/NEWS
   pkg/CHNOSZ/man/CHNOSZ-package.Rd
   pkg/CHNOSZ/vignettes/equilibrium.Rnw
   pkg/CHNOSZ/vignettes/equilibrium.lyx
Log:
prepare for release on CRAN


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2014-01-11 04:28:50 UTC (rev 61)
+++ pkg/CHNOSZ/DESCRIPTION	2014-01-12 15:17:43 UTC (rev 62)
@@ -1,6 +1,6 @@
-Date: 2014-01-11
+Date: 2014-01-12
 Package: CHNOSZ
-Version: 1.0.2-3
+Version: 1.0.3
 Title: Chemical Thermodynamics and Activity Diagrams
 Author: Jeffrey Dick
 Maintainer: Jeffrey Dick <j3ffdick at gmail.com>

Modified: pkg/CHNOSZ/inst/CHECKLIST
===================================================================
--- pkg/CHNOSZ/inst/CHECKLIST	2014-01-11 04:28:50 UTC (rev 61)
+++ pkg/CHNOSZ/inst/CHECKLIST	2014-01-12 15:17:43 UTC (rev 62)
@@ -23,7 +23,7 @@
   data files are uncompressed on installation? (from BuildResaveData: no)
   anim.*() produce pngs / movies (ImageMagick dependency)?
 
-- check that dl.aa() works with current UniProt web pages
+- check that uniprot.aa() works with current UniProt web pages
 
 - check for stale URLs in Rd files
 

Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS	2014-01-11 04:28:50 UTC (rev 61)
+++ pkg/CHNOSZ/inst/NEWS	2014-01-12 15:17:43 UTC (rev 62)
@@ -1,5 +1,5 @@
-CHANGES IN CHNOSZ 1.0.2-3 (2014-01-11)
---------------------------------------
+CHANGES IN CHNOSZ 1.0.3 (2014-01-12)
+------------------------------------
 
 - Updated extdata/protein/Sce.csv.xz using Saccharomyces Genome
   Database protein_properties.tab and SGD_features.tab dated
@@ -11,13 +11,16 @@
   Reference Sequence (RefSeq) release 61 (2013-09-09). Code was
   adapted to deal with WP multispecies accessions.
 
-- read.fasta() gets new argument 'id'; when supplied, it skips reading
-  the protein names from the FASTA headers.
+- read.fasta() gets new argument 'id'; when supplied, it is used for
+  the protein names in the output, in place of those read from the
+  FASTA headers.
 
 - When reading protein names from the FASTA headers, read.fasta()
   stops only at the first space, not space or underscore as before.
 
-- info() no longer specially sets state of "O2" or "oxygen" to gas.
+- info() no longer specially sets state of "O2" to gas. The name
+  "oxygen", or the combination ("O2", "gas"), can be used to retrieve
+  data for the gas.
 
 - In thermo$obigt, names of gases (e.g. "oxygen") are used only for
   the gaseous species; names were removed from dissolved species in
@@ -26,15 +29,13 @@
 
 - In read.expr(), allow multiple filter specifications.
 
-- In revisit(), extend ranges of axes of scatter plots.
-
 - revisit() has new argument loga0, a single vector of base-10
   logarithms of activities of species used to calculate the base-2 log
   ratio ( log2(a1/a0) ).
 
-- Updated tests to be compatible with testthat version 0.8. Some tests
-  now check for e.g. errors *and* warnings produced by a single
-  function call.
+- Updated tests to be compatible with testthat version 0.8 (in
+  development). Some tests now check for e.g. an error *and* warning
+  produced by a single function call.
 
 CHANGES IN CHNOSZ 1.0.1 (2013-07-04)
 ------------------------------------

Modified: pkg/CHNOSZ/man/CHNOSZ-package.Rd
===================================================================
--- pkg/CHNOSZ/man/CHNOSZ-package.Rd	2014-01-11 04:28:50 UTC (rev 61)
+++ pkg/CHNOSZ/man/CHNOSZ-package.Rd	2014-01-12 15:17:43 UTC (rev 62)
@@ -77,10 +77,6 @@
   \code{\link{diagram}} causes an error while plotting stability field boundaries if the x and y resolutions are not identical.
 }
 
-\seealso{
-  The \code{TODO} file in the package installation directory contains a list of changes anticipated or considered for future releases.
-}
-
 \examples{
 ### Getting Started
 ## the 'thermo' object contains thermodynamic data and is also where

Modified: pkg/CHNOSZ/vignettes/equilibrium.Rnw
===================================================================
--- pkg/CHNOSZ/vignettes/equilibrium.Rnw	2014-01-11 04:28:50 UTC (rev 61)
+++ pkg/CHNOSZ/vignettes/equilibrium.Rnw	2014-01-12 15:17:43 UTC (rev 62)
@@ -1,12 +1,13 @@
-%% LyX 2.0.5 created this file.  For more info, see http://www.lyx.org/.
+%% LyX 2.1.0beta2 created this file.  For more info, see http://www.lyx.org/.
 %% Do not edit unless you really know what you are doing.
-\documentclass[noae]{article}
+\documentclass[english,noae]{article}
 \usepackage{mathpazo}
 \usepackage[T1]{fontenc}
 \usepackage[latin9]{inputenc}
 \usepackage[letterpaper]{geometry}
 \geometry{verbose,tmargin=2.5cm,bmargin=2.5cm,lmargin=2.5cm,rmargin=2.5cm}
 \usepackage{color}
+\usepackage{babel}
 \usepackage{amsbsy}
 \usepackage{amssymb}
 \usepackage[numbers]{natbib}
@@ -130,8 +131,6 @@
 
 
 
-
-
 \section{Reaction-matrix approach}
 
 
@@ -159,7 +158,6 @@
 species("CSG",c("METVO", "METJA"))
 @
 
-
 Although the basis species are defined, the temperature is not yet
 specified, so it is not immediately possible to calculate the ionization
 states of the proteins. That is why the coefficient on $\mathrm{H^{+}}$
@@ -172,7 +170,6 @@
 protein.info(species()$name)
 @
 
-
 Note that \texttt{affinity()} is called twice by \texttt{protein.info()};
 this so that both charges and standard Gibbs energies of ionization
 of the proteins can be calculated. The \texttt{Z} values in the table
@@ -188,7 +185,6 @@
 a$values
 @
 
-
 Since \texttt{affinity()} returns a list with a lot of information
 (such as the basis species and species definitions) the last command
 was written to only print the \texttt{values} part of that list. The
@@ -267,7 +263,6 @@
 e$loga.equil
 @
 
-
 Those are the logarithms of the equilibrium activities of the proteins.
 Combining these values with either Eqs. (\ref{eq:A_METVO}) or (\ref{eq:A_METJA})
 gives us the same value for affinity of the formation reactions per
@@ -335,7 +330,6 @@
 protein.basis(species()$name, normalize=TRUE)
 @
 
-
 Let us denote by $\boldsymbol{A}_{12}$ and $\boldsymbol{A}_{13}$
 the chemical affinities of Reactions \ref{react:CSG_METVO_residue}
 and \ref{react:CSG_METJA_residue}. We can write 
@@ -423,6 +417,8 @@
 for CSG example we have been discussing.
 
 \begin{small}
+
+<<>>=
 <<protein_equil>>=
 # get an error if we don't data(thermo), only in the re-building vignettes of R CMD check
 data(thermo)
@@ -431,9 +427,9 @@
 swap.basis("O2", "H2")
 protein.equil(protein, loga.protein=-3)
 @
+
 \end{small}
 
-
 The function checks (``check it!'') against the step-by-step calculations
 the values of $\boldsymbol{A}^{*}$ calculated using \texttt{affinity()},
 and the equilibrium activities of the proteins calculated using \texttt{equilibrate()}.
@@ -469,14 +465,13 @@
 title(main="Equilibrium activities of proteins, normalized formulas")
 @
 
-
 The reaction-matrix approach described above can also be applied to
 systems having conservation coefficients that differ from unity, such
 as many mineral and inorganic systems, where the immobile component
 has different molar coefficients in the formulas. For example, consider
 a system like that described in \citep{See96}:
 
-\setkeys{Gin}{width=0.7\textwidth}
+\setkeys{Gin}{width=0.7\textwidth}<<>>=
 <<SulfurSpeciation,fig=T>>=
 basis("CHNOS+")
 basis("pH",5)
@@ -491,9 +486,9 @@
 diagram(e, ylim=c(-30, 0), legend.x="topleft", cex.names=0.8)
 title(main="Aqueous sulfur speciation, normalized formulas")
 @
+
 \setkeys{Gin}{width=1.0\textwidth}
 
-
 The first diagram is quantitatively very similar to the one shown
 by Seewald, 1997, but if we use the normalized formulas, in this case
 divided by $\mathrm{H_{2}S}$ in the formation reactions, the range
@@ -534,10 +529,13 @@
 activities (Blood plasma proteins, ``IL'' for interleukin):
 
 \begin{small}
+
 \setkeys{Gin}{width=0.8\textwidth}
+
+<<>>=
 <<Plasma, fig=T, results=hide, width=8, height=4>>=
 data(thermo)  # cleanup from previous plot
-basis(c("CO2", "NH3", "H2S", "H2O", "O2"), c(-3, -3, -10))
+basis(c("CO2", "NH3", "H2S", "H2O", "oxygen"), c(-3, -3, -10))
 f <- system.file("extdata/abundance/AA03.csv", package="CHNOSZ")
 pdat <- read.csv(f, as.is=TRUE)
 iil <- grep("^IL", pdat$name)
@@ -549,17 +547,21 @@
 dE <- diagram(e, main="equilibrium activities")
 stopifnot(identical(dA$predominant, dE$predominant))
 @
+
 \setkeys{Gin}{width=1.0\textwidth}
+
 \end{small}
 
-
 Here is an example where the predominant species in the equilibrium
 assemblage are \textbf{\emph{not}} identical to those calculated the
 maximum affinity method, and it is not possible for the maximum affinity
 method to make those curved lines!!
 
 \begin{small}
+
 \setkeys{Gin}{width=0.8\textwidth}
+
+<<>>=
 <<Amino, fig=T, results=hide, width=8, height=4>>=
 basis("CHNOS+")
 species(aminoacids(""))
@@ -569,9 +571,9 @@
 e <- equilibrate(a)
 dE <- diagram(e, main="equilibrium activities")
 @
+
 \end{small}
 
-
 Take-home: when making predominance diagrams, confidently use the
 maximum affinity method when \texttt{normalize=TRUE} (as done here
 for proteins); otherwise it is advisable to compute the equilibrium
@@ -593,7 +595,6 @@
 sessionInfo()
 @
 
-
 \bibliographystyle{plainnat}
 \bibliography{vig}
 

Modified: pkg/CHNOSZ/vignettes/equilibrium.lyx
===================================================================
--- pkg/CHNOSZ/vignettes/equilibrium.lyx	2014-01-11 04:28:50 UTC (rev 61)
+++ pkg/CHNOSZ/vignettes/equilibrium.lyx	2014-01-12 15:17:43 UTC (rev 62)
@@ -1,5 +1,5 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
+#LyX 2.1 created this file. For more info see http://www.lyx.org/
+\lyxformat 474
 \begin_document
 \begin_header
 \textclass article
@@ -21,13 +21,13 @@
 \font_roman palatino
 \font_sans default
 \font_typewriter default
+\font_math auto
 \font_default_family default
 \use_non_tex_fonts false
 \font_sc false
 \font_osf false
 \font_sf_scale 100
 \font_tt_scale 100
-
 \graphics default
 \default_output_format default
 \output_sync 0
@@ -48,15 +48,24 @@
 \pdf_quoted_options "citecolor=black, linkcolor=black"
 \papersize letterpaper
 \use_geometry true
-\use_amsmath 1
-\use_esint 1
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine natbib_numerical
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 0
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 0
+\use_package mhchem 1
+\use_package stackrel 0
+\use_package stmaryrd 0
+\use_package undertilde 0
+\cite_engine natbib
+\cite_engine_type numerical
+\biblio_style plainnat
 \use_bibtopic false
 \use_indices false
 \paperorientation portrait
 \suppress_date false
+\justification true
 \use_refstyle 0
 \branch scrap
 \selected 1
@@ -377,29 +386,37 @@
 \begin_inset Branch scrap
 status open
 
-\begin_layout Chunk
+\begin_layout Standard
+\begin_inset Flex Chunk
+status open
 
-<<add_obigt>>=
+\begin_layout Plain Layout
+
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+add_obigt
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
 library(CHNOSZ)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 data(thermo)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 add.obigt()
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
-@
+
 \end_layout
 
 \end_inset
@@ -493,24 +510,32 @@
 \begin_inset Branch scrap
 status open
 
-\begin_layout Chunk
+\begin_layout Standard
+\begin_inset Flex Chunk
+status open
 
-<<ProteinFormation>>=
+\begin_layout Plain Layout
+
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+ProteinFormation
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
 basis("CHNOS+")
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 species("CSG",c("METVO", "METJA"))
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
-@
+
 \end_layout
 
 \end_inset
@@ -543,19 +568,27 @@
 \begin_inset Branch scrap
 status open
 
-\begin_layout Chunk
+\begin_layout Standard
+\begin_inset Flex Chunk
+status open
 
-<<ProteinInfo>>=
+\begin_layout Plain Layout
+
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+ProteinInfo
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
 protein.info(species()$name)
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
-@
+
 \end_layout
 
 \end_inset
@@ -605,24 +638,32 @@
 \begin_inset Branch scrap
 status open
 
-\begin_layout Chunk
+\begin_layout Standard
+\begin_inset Flex Chunk
+status open
 
-<<ProteinAffinity>>=
+\begin_layout Plain Layout
+
+\begin_inset Argument 1
+status collapsed
+
+\begin_layout Plain Layout
+ProteinAffinity
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
 a <- affinity()
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 a$values
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
-@
+
 \end_layout
 
 \end_inset
@@ -875,24 +916,32 @@
 \begin_inset Branch scrap
 status open
 
-\begin_layout Chunk
+\begin_layout Standard
+\begin_inset Flex Chunk
+status open
 
-<<ProteinActivities>>=
+\begin_layout Plain Layout
+
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+ProteinActivities
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
 e <- equilibrate(a)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 e$loga.equil
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
-@
+
 \end_layout
 
 \end_inset
@@ -1138,19 +1187,27 @@
 \begin_inset Branch scrap
 status open
 
-\begin_layout Chunk
+\begin_layout Standard
+\begin_inset Flex Chunk
+status open
 
-<<>>=
+\begin_layout Plain Layout
+
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
 protein.basis(species()$name, normalize=TRUE)
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
-@
+
 \end_layout
 
 \end_inset
@@ -1455,57 +1512,74 @@
 \begin_inset Branch scrap
 status open
 
-\begin_layout Chunk
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
 
+\begin_layout Plain Layout
 
+
 \backslash
 begin{small}
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Flex Chunk
+status open
+
+\begin_layout Plain Layout
+
 <<protein_equil>>=
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 # get an error if we don't data(thermo), only in the re-building vignettes
  of R CMD check
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 data(thermo)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 protein <- iprotein(c("CSG_METVO", "CSG_METJA"))
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 basis("CHNOS+")
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 swap.basis("O2", "H2")
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 protein.equil(protein, loga.protein=-3)
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
-@
+
 \end_layout
 
 \begin_layout Chunk
+\begin_inset ERT
+status collapsed
 
+\begin_layout Plain Layout
 
+
 \backslash
 end{small}
 \end_layout
@@ -1515,6 +1589,11 @@
 
 \end_layout
 
+\end_inset
+
+
+\end_layout
+
 \begin_layout Standard
 The function checks (
 \begin_inset Quotes eld
@@ -1608,79 +1687,87 @@
 \begin_inset Branch scrap
 status open
 
-\begin_layout Chunk
+\begin_layout Standard
+\begin_inset Flex Chunk
+status open
 
-<<ProteinSpeciation,fig=T>>=
+\begin_layout Plain Layout
+
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+ProteinSpeciation,fig=T
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
 organisms <- c("METSC", "METJA", "METFE", "HALJP",
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
   "METVO", "METBU", "ACEKI", "GEOSE", "BACLI", "AERSA")
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 proteins <- c(rep("CSG", 6), rep("SLAP", 4))
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 basis("CHNOS+")
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 species(proteins, organisms)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 a <- affinity(O2=c(-100, -65))
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 par(mfrow=c(2, 1))
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 e <- equilibrate(a)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 diagram(e, ylim=c(-5, -1), legend.x=NA)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 title(main="Equilibrium activities of proteins, whole formulas")
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 e <- equilibrate(a, normalize=TRUE)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 diagram(e, ylim=c(-5, -1), legend.x=NA)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 title(main="Equilibrium activities of proteins, normalized formulas")
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
-@
+
 \end_layout
 
 \end_inset
@@ -1707,88 +1794,102 @@
 \begin_inset Branch scrap
 status open
 
-\begin_layout Chunk
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
 
+\begin_layout Plain Layout
 
+
 \backslash
 setkeys{Gin}{width=0.7
 \backslash
 textwidth}
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
+
+\begin_inset Flex Chunk
+status open
+
+\begin_layout Plain Layout
+
 <<SulfurSpeciation,fig=T>>=
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 basis("CHNOS+")
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 basis("pH",5)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 species(c("H2S", "S2-2", "S3-2", "S2O3-2", "S2O4-2",
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
   "S3O6-2", "S5O6-2", "S2O6-2", "HSO3-", "SO2", "HSO4-"))
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 a <- affinity(O2=c(-50, -15), T=325, P=350)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 par(mfrow=c(2, 1))
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 e <- equilibrate(a, loga.balance=-2)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 diagram(e, ylim=c(-30, 0), legend.x="topleft", cex.names=0.8)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 title(main="Aqueous sulfur speciation, whole formulas")
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 e <- equilibrate(a, loga.balance=-2, normalize=TRUE)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 diagram(e, ylim=c(-30, 0), legend.x="topleft", cex.names=0.8)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 title(main="Aqueous sulfur speciation, normalized formulas")
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
-@
+
 \end_layout
 
 \begin_layout Chunk
+\begin_inset ERT
+status open
 
+\begin_layout Plain Layout
 
+
 \backslash
 setkeys{Gin}{width=1.0
 \backslash
@@ -1800,6 +1901,11 @@
 
 \end_layout
 
+\end_inset
+
+
+\end_layout
+
 \begin_layout Standard
 The first diagram is quantitatively very similar to the one shown by Seewald,
  1997, but if we use the normalized formulas, in this case divided by 
@@ -1913,104 +2019,139 @@
 \begin_inset Branch scrap
 status open
 
-\begin_layout Chunk
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
 
+\begin_layout Plain Layout
 
+
 \backslash
 begin{small}
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
 
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
 \backslash
 setkeys{Gin}{width=0.8
 \backslash
 textwidth}
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Flex Chunk
+status open
+
+\begin_layout Plain Layout
+
 <<Plasma, fig=T, results=hide, width=8, height=4>>=
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 data(thermo)  # cleanup from previous plot
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
-basis(c("CO2", "NH3", "H2S", "H2O", "O2"), c(-3, -3, -10))
+basis(c("CO2", "NH3", "H2S", "H2O", "oxygen"), c(-3, -3, -10))
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 f <- system.file("extdata/abundance/AA03.csv", package="CHNOSZ")
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 pdat <- read.csv(f, as.is=TRUE)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 iil <- grep("^IL", pdat$name)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 species(pdat$name[iil], "HUMAN")
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 a <- affinity(O2=c(-82, -78), H2O=c(-12, -2))
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 par(mfrow=c(1, 2))
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 dA <- diagram(a, normalize=TRUE, main="maximum affinity")
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 e <- equilibrate(a, normalize=TRUE)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 dE <- diagram(e, main="equilibrium activities")
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 stopifnot(identical(dA$predominant, dE$predominant))
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
-@
+
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Standard
+\begin_inset ERT
+status open
 
+\begin_layout Plain Layout
 
+
 \backslash
 setkeys{Gin}{width=1.0
 \backslash
 textwidth}
 \end_layout
 
+\end_inset
+
+
+\end_layout
+
 \begin_layout Chunk
+\begin_inset ERT
+status open
 
+\begin_layout Plain Layout
 
+
 \backslash
 end{small}
 \end_layout
@@ -2020,6 +2161,11 @@
 
 \end_layout
 
+\end_inset
+
+
+\end_layout
+
 \begin_layout Standard
 Here is an example where the predominant species in the equilibrium assemblage
  are 
@@ -2036,70 +2182,96 @@
 \begin_inset Branch scrap
 status open
 
-\begin_layout Chunk
+\begin_layout Standard
+\begin_inset ERT
+status open
 
+\begin_layout Plain Layout
 
+
 \backslash
 begin{small}
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
 
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
 \backslash
 setkeys{Gin}{width=0.8
 \backslash
 textwidth}
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Flex Chunk
+status open
+
+\begin_layout Plain Layout
+
 <<Amino, fig=T, results=hide, width=8, height=4>>=
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 basis("CHNOS+")
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 species(aminoacids(""))
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 a <- affinity(O2=c(-71, -66), H2O=c(-8, 4))
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 par(mfrow=c(1, 2))
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 dA <- diagram(a, main="maximum affinity")
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 e <- equilibrate(a)
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Plain Layout
 
 dE <- diagram(e, main="equilibrium activities")
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
-@
+
 \end_layout
 
 \begin_layout Chunk
+\begin_inset ERT
+status open
 
+\begin_layout Plain Layout
 
+
 \backslash
 end{small}
 \end_layout
@@ -2109,6 +2281,11 @@
 
 \end_layout
 
+\end_inset
+
+
+\end_layout
+
 \begin_layout Standard
 Take-home: when making predominance diagrams, confidently use the maximum
  affinity method when 
@@ -2157,19 +2334,27 @@
 R session information
 \end_layout
 
-\begin_layout Chunk
+\begin_layout Standard
+\begin_inset Flex Chunk
+status open
 
-<<SessionInfo>>=
+\begin_layout Plain Layout
+
+\begin_inset Argument 1
+status open
+
+\begin_layout Plain Layout
+SessionInfo
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
 sessionInfo()
 \end_layout
 
-\begin_layout Chunk
+\end_inset
 
-@
+
 \end_layout
 
 \end_inset



More information about the CHNOSZ-commits mailing list