The aim of this graduate-level textbook 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 the basics of R syntax, data input/output, calculation and plotting of commonly used indexes and graphs. The core of the book then focusses on numerical 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 the forward/reverse modelling techniques, followed by practical exercises presenting typical problems likely to be encountered in real life, and their solutions. The appendix contains a quick introduction to the open-source R-package GCDkit (www.gcdkit.org) for interpretation of whole-rock geochemical data from igneous and metamorphic rocks.