Compare Detrital Zircon Suites

Compare detrital zircon suites by uploading univariate, U-Pb age, or bivariate, U-Pb age and Lu-Hf data, in a 'shiny'-based user-interface. Outputs publication quality figures using 'ggplot2', and tables of statistics currently in use in the detrital zircon geochronology community.

Build Status CRAN_Status_Badge

detzrcr is an R-package for plotting and running statistical tests on univariate (U-Pb age) and bivariate (U-Pb age and Lu-Hf data) detrital zircon data for comparison between samples. The package uses a user interface built with shiny and produces publication quality figures using ggplot2.


Install either from CRAN


or install the development version from github (requires devtools)

# install.packages("devtools")

Use package

Launch user interface with


For the sake of simplicity input data is required to be a csv-file which contains at least a column containing the U-Pb age data. This column must be called age, associated uncertainty and discordancy (if included) must be in columns uncert and disc, respectively. All ages must be in Ma.

The file can contain the Lu-Hf data in two ways: measured 176/177Hf and measured Lu/Hf in columns called hfhf and luhf, respectively; or a column with initial epsilon-Hf with the name ehf_i.

Several samples can be included in the csv-file and which one(s) to plot can be choosen interactively in the user interface. For this to work a column called sample must be present, and each analysis (i.e. each row) must contain the name of the sample it belongs to in this column.

Detrital zircon U-Pb and Lu-Hf example data from the Natal Group, KwaZulu-Natal, South Africa (Kristoffersen et al. 2016) are included in the package.


Kristoffersen, M., Andersen, T., Elburg, M.A., Watkeys, M.K., 2016. Detrital zircon in a supercontinental setting: locally derived and far-transported components in the Ordovician Natal Group, South Africa. J. Geol. Soc. London. 173, 203-215.


detzrcr 0.2.4

  • Fixed error in y-axis slider for Hf plot
  • Added option for y-axis erro bar for Hf plot

detzrcr 0.2.3

  • Added option to use fixed y-axis in KDE/PDP plots
  • Changed axis limit sliders to numeric input

detzrcr 0.2.2

  • Added optional Hf errorbars
  • Added bandwidth selection in Hf plot

detzrc 0.2.1

  • Fixed misspelling in ECDF plot.
  • Updated citation file.
  • Maxima calculation in Reimink plot works

detzrcr 0.2.0

  • Updated citation file.
  • Added Reimink et al. (2016) intercept calculation and plot.

detzrcr 0.1.3

  • Fixed error in likeness and 1-O tables occuring if in-data did not include Hf-data.
  • Fixed display error of graphical 1-O table if not all categories are present in the data.
  • Added vignette.

detzrcr 0.1.2

  • Added option to specify x-axis breaks for plots.
  • Fixed 1-O calculation.
  • Added option to combine result matrices (U-Pb upper triangle and Lu-Hf lower triangle).
  • Added graphical representation of 1-O matrix.
  • Interpolate ecdfs over entire calculation range.
  • Added plot options panel (only font options are included for now).
  • In-data can now include empty cells.

detzrcr 0.1.1

  • User interface now actually works.

detzrcr 0.1.0

  • First release of the detzrcr package.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.3.1 by Magnus Kristoffersen, a year ago

Browse source code at

Authors: Magnus Kristoffersen [aut, cre]

Documentation:   PDF Manual  

GPL-3 license

Imports ggplot2, shiny, MASS, stats, graphics, utils, DT

Suggests knitr, rmarkdown

See at CRAN