Geochemical Modelling of Igneous Processes – Principles And Recipes in R Language

Part of the series Springer Geochemistry pp 11-25


Data Manipulation and Simple Calculations

  • Vojtěch JanoušekAffiliated withCzech Geological Survey Email author 
  • , Jean-François MoyenAffiliated withUniversité Jean-Monnet
  • , Hervé MartinAffiliated withUniversité Blaise-Pascal
  • , Vojtěch ErbanAffiliated withCzech Geological Survey
  • , Colin FarrowAffiliated with

* Final gross prices may vary according to local VAT.

Get Access


This chapter will demonstrate the practical use of the R language (for overview of its syntax, see Appendix A) and GCDkit (Appendix B) to solve common problems in igneous geochemistry. We shall follow the basic procedure from loading the data into the system, through their subsetting, calculation of basic indexes (such as mg# or A/CNK values) or cationic parameters (after Niggli, Debon & Le Fort and De la Roche), to normative recalculations (e.g., CIPW norm). Briefly mentioned are also statistical applications of the R language, such as obtaining simple descriptive statistics and use of factors-based grouping to deal with complex geochemical data sets.