The recommended way to install these is by using
devtools::install_github("jfmoyen/GCDmodel")
This will ensure that you get the most recent code. Alternately, go to the "release" section of this page and download the version appropriate for your system.
- Not many visible (user-facing) changes, but under the hood, a lot of code restructuring.
- The GCDmodel version of
millications()
stops trying to emulate GCDkit and has been rewritten from scratch - The
Zrsat_XXX
functions, as well asGCDmodel::millications()
should now be able to digest WR or milli (respectively wt. pct oxides or millications) in all(?) sensible formats: data frame, matrix or (named) vector. - Two global variables are now visible,
periodicTable
andpetroOxides
.periodicTable
, from https://gist.github.com/GoodmanSciences/c2dd862cd38f21b0ad36b8f96b4bf1ee, includes the atom mass and quite a few other properties for all atoms in the peridoic table.petroOxides
includes oxide information (mass, nb of cations and anions...) for commonly used oxides in petrology. They are exported and are visible withGCDmodel::periodicTable
andGCDmodel::petroOxides
-
The saturation code for zircon has been modified. It does not use GCDkit code anymore, but internal versions - in file ZrSaturation.R
-
GCDkit's millications() is still used, if GCDkit is loaded. Otherwise we use a local clone.
-
This allows to select more easily the model to use. Now, the functions that use zircon saturation (i.e.
correctZrnSat
andcorrectZrnMnzSat
) accept two arguments,SatModel
andSatArgs
.SatModel
is the name of a saturation model (Boehnke, WH or Crisp).SatArgs
are additional arguments passed to the model: TK and Zr are always passed, but other models require more parameters. Crisp, for instance, needs xH2O and P. In this case they should be passed withSatArgs=list(H2O= ... ,Pbar= ...)
. This should allow to define relatively simply new zircon saturation functions, using any equation of choice. The header should look like the following:ZrSat_XXX<-function(WR,milli=NULL,TK=NULL,Zr=NULL,...)
where XXX is the name by which the model will be called. Before the ..., include any other potentially useful argument, for instanceZrSat_Crisp<-function(WR,milli=NULL,TK=NULL,Pbar=NULL,Zr=NULL,H2O=NULL,...)