Monday 9 November 2015

GCDkit 4.0 (Great October Revolution) just released!

We are pleased to announce that the new stable version of GCDkit has been just released!
Primarily, it is aimed to accompany our freshly published book (see the previous post). Of course, this brought about numerous small changes to the code, especially in the batch mode.

But there also further important improvements, even though many are hiding behind the bonnet.

  •  At last, the package has got its NAMESPACE, which means that it became available for R 3.2 and higher.
  •  Hopefully fixed were the notorious problems with installation pointed out by several users even on this forum. They were apparently occurring when there has been a personal library folder created during the R installation process.  
  • Improved was the help system, which includes a number of illustrative figures now.  
  • Semitransparency of plotting symbols (that can be set through function setTransparency) or fields (e.g., in spiderByGroupFields).Use preferably PDF export to preserve it.
  • New possibility of assigning colours according to values of a variable (assignColVar). 
  • Table of molecular weights from the CIAAW official web site (http://www.ciaaw.org) has replaced the existing one.  
  • New diagrams:
    • New geotectonic diagrams of Müller et al. (1992) for potassic igneous rocks
    • New Nb/Yb–Th/Yb and Nb/Yb–TiO2 /Yb plots of Pearce (2008) 
  • New plugin:
    • Rutile saturation algorithms of Ryerson & Watson (1987) and Hayden & Watson (2007)
  • File input/output:
    • improved import from GeoRoc, references in the end saved into file, references.txt and shown in a separate window upon load,
    • reading ROC, PEG, CSV files even on 64bit systems,
    • improved merging of files,
    • fixed problems with comments in data files.
  •  Legends:
    • improved appearance of legends, esp. for single colour and/or single plotting symbol,
    • corrected were problems with legends in spider.contour and spiderByGroupFields,
    • fixed were legends in figMulti, in addition their backgrounds became semitransparent.
  •  Calculations:
    • addResults replaces any already existing variables of the given name,
    • printSamples got a new parameter, print=FALSE, that allows to use the function just for calculations, i.e. skipping the printing,
    • millications can be newly calculated from any matrix/vector ,
    • the function groupsByLabel assigns a value (Undefined) to analyses for which the grouping information is missing,
    • calcCore did not work correctly for fractions. For instance, Nb/Ta ratios were Inf for Ta contents that were not determined. This affected scaling of plots etc.,
    • summaryRangesByGroup and strip work correctly even for subsets.
 
  •  Plotting:
    • new function plateLabelSlots to annotate individual slots by letters, numbers or Roman numerals,
    • binary and plotWithLimits allow linear fits also when some (or both) of the axes is/are logarithmic.
    • contourGroups is more robust now - and works better on datasets with missing values.

 Enjoy!
Vojtech

Tuesday 27 October 2015

Book on geochemical modelling of magmatic processes in R/GCDkit

We break the two years of our silence with some news potentially interesting to anyone involved in interpretation of whole-rock geochemical data from igneous rocks. We are pleased to announce that, after two years of intense writing, we have finally published a book:

Janoušek, V., Moyen, J. F., Martin, H., Erban, V. & Farrow, C. M. (2016). Geochemical Modelling of Igneous Processes – Principles and Recipes in R Language. Bringing the Power of R to a Geochemical Community. Springer-Verlag, Berlin, Heidelberg, 346 pp. 


 Abstract from the publisher:
"The aim of this book is to unlock the power of the freeware R language to advanced university students and researchers dealing with whole-rock geochemistry of (meta-) igneous rocks. The first part covers data input/output, calculation of commonly used indexes and plotting in R. The core of the book then focuses on the presentation and practical implementations of modelling techniques used for fingerprinting processes such as partial melting, fractional crystallization, binary mixing or AFC using major-, trace-element and radiogenic isotope data. The reader will be given a firm theoretical basis for forward/reverse modelling, followed by exercises dealing with typical problems likely to be encountered in real life, and their solutions using R. The concluding sections GCDkit for interpretation of whole-rock geochemical data from igneous and metamorphic rocks."
demonstrate, using practical examples, how a researcher can proceed in developing a realistic model simulating natural systems. The appendices outline the fundamentals of the R language and provide a quick introduction to the open-source R-package
In more simple words, this book:
  • Provides basics of R language and its application to geochemical problems,
  • Gives the first comprehensive introduction to the GCDkit system,
  • Explains fundamentals of numerical modelling of igneous processes,
  • Shows not only formulae, but also the successful modelling strategies,
  • Includes numerous worked examples how geochemical modelling helps us to understand geological problems.
And its contents are in the nutshell:

Part I: R/GCDkit at work

  • Loading and Manipulating Data
  • Linking Whole-Rock Chemistry with Mineral Stoichiometry
  • Statistics
  • Classification and Grouping
  • Classical Plots
    (binary, Harker, ternary, spider)
  • Specialized Plots
    (log–log, specialized spiderplots, contour plots, anomaly plots…)
  • Radiogenic Isotopes
    (initial ratios, epsilon values, model ages, isochrons…)

Parts II–IV: Majors, traces, radiogenic isotopes

  • Core of the book; explains fundamentals of each direct and reverse modelling, including the relevant formulae
  • Introduces the numerical solution and its implementation in the R language
  • Includes a number of real numerical problems
  • Each is presented as a numerical receipt with solution in R  (± GCDkit )

Part V: Practical Modelling

  • Choosing an Appropriate Model
    (evidence for crystallization, partial melting, magma mixing and assimilation…)
  • Semi-Quantitative Approach
    (assessing the trace-element compatibility, process identification, mixing test…)
  • Constraining a Model
    (using appropriate strategy, obtaining input parameters for the model, partition coefficients, dealing with accessories…)
  • Numerical Tips and Tricks
    (reducing system, colinearity, breaking minerals to end-members, coupling majors and traces…)
  • Common Sense in Action
    (thermodynamic, rheological  constraints, scale and speed of processes, how well can we distinguish between models, dangerous projections…)

Part VI: Worked Examples

  • Differentiation of a Calc-Alkaline Series: Atacazo-Ninahuilca volcanoes, Ecuador
  • Progressive Melting of a Metasedimentary Sequence: the Saint-Malo Migmatitic Complex, France
  • Appendix A: R Syntax in a Nutshell
  • Appendix B: Introduction to GCDkit
  • Appendix C: Solving Systems of Linear Algebraic Equations in R
Courtesy of the publisher, the Appendices explaining the R syntax and the workings of the GCDkit system, are freely available here.