Plug-in modules
The GCDkit is easily expandable by the so-called Plugins, e.g. text files with R code stored in the subdirectory Plugin.
These are all automatically executed (sourced) upon loading the new data set and typically define additional functions, accessible via newly appended menu items.
User-defined modules
User-contributed plugins are highly appreciated. If you intend to write a plugin, follow several simple rules:
-
All the numeric data are available in the numeric matrix
WR
as soon as the data file is loaded into memory -
The rest is stored in the data frame
labels,
including the plotting symbols (labels[,"Symbol"]
) and colours (labels[,"Colours"]
) -
Feel free to use the functions for selection of samples (
selectSamples()
), a single (selectColumnLabel()
) or multiple (selectColumnsLabels()
) variables. Read the corresponding manual entries for the correct syntax -
If your function, say
foo,
is to be attached to the menu system, use a construction analogous to:
winMenuAddItem("Plugins", "My function added to the system", "foo()")
-
Examine carefully the existing plugins, e.g.
saturation.r
If your function is of wider interest, please share it with other colleagues, as much as we do results of our efforts. We would like to distribute the user-defined plugins on this page, so let us know!
Standard modules
These come with the standard distribution of GCDkit. No extra installation is necessary, including required libraries, distributed within the GCDkit install file.
Name | Functionality | Author last modified |
SrNd.r | Initial isotopic ratios, epsilon Nd values, Nd model ages, plotting simple isochron diagrams, boxplot/stripplots and binary graphs involving the isotopic data. | V. Janoušek (2018-02-13) |
saturation.r | Saturation temperatures for common accessories (zircon, apatite and monazite) as well as corresponding saturation levels of Zr, P, LREE and Ti (Watson and Harrison, 1983; Harrison and Watson, 1984; Ryerson and Watson 1987; Bea et al., 1992; Pichavant et al., 1992; Montel, 1993; Hayden and Watson 2007; Boehnke et al. 2013). Early version of this plugin is dedicated a separate web page. | V. Janoušek (2018-02-14) |
tetrad.r | Calculates lanthanide tetrad effect following the method of Irber (1999). | V. Janoušek (2018-02-12) |
isocon.r | Implementation of isocon plot after Grant (1986, 2005) widely used for quantitative estimates of changes in mass/volume/concentration of elements or oxides in course of various open-system geochemical processes such as alteration or partial melting. The plugin also includes implementations of concentration ratio diagrams and wedge plots after Ague (1994) and Bucholz and Ague (2010). | V. Janoušek (2018-02-12) |
JungAlTitemp.r | This plugin estimates the temperature of a granitic magma based on measured Al2O3/TiO2 ratio and experimental constraints. The regression formulae were defined by Jung & Pfander (2007). | V. Janoušek (2018-03-08) |
disclosure.r | Implementation of centred-log-ratio (clr) transformation for compositional data (Pawlowsky-Glahn and Egozcue 2006). | V. Janoušek (2018-03-08) |
projbiot.r | Ternary projection from biotite for granitic rocks (Moyen et al. 2017). | J.F. Moyen (2019-08-14) |
User-defined graph templates
Also the palette of the GCDkit graph templates can be easily expanded by user-defined ones, residing in the subdirectory Diagrams/User
.
All *.r or *.R files stored in this subdirectory, except those whose name starts with underscore ("_") are sourced every time the menu item 'Plots|User defined...'
is invoked. Hence the list of available diagrams is always built on fly, using the function .userlist()
.
The diagrams can be both stand-alone, or plates. So far, the user-defined diagrams cannot be used for classification and cannot have language versions other than English.
For stand-alone, single Figaro templates, the crucial information is:
- Name of the plot:
sheet$demo$template$GCDkit$plot.name
- Sequence number of the plot in the menu:
sheet$demo$template$GCDkit$plot.position
- Name of function defining a diagram
- Name of the plot:
plate$plot.name
- Sequence number of the plot in the menu:
plate$plot.position
- Name of function defining a plate
In both cases, the file should define a single function of a name identical to the (root of) the filename.
'Sequence number' above is any positive real number (i.e., does not have to be an integer).
HTML documentation is linked to the help system automatically. However, this is only done when the *.htm
file, named exactly like the function, resides in Diagrams/User/doc
subdirectory. See examples provided with the current distribution.