itrax_section: Cluster analysis and statistical grouping of Itrax data

View source: R/itrax_section.R

itrax_sectionR Documentation

Cluster analysis and statistical grouping of Itrax data

Description

Performs a cluster analysis and automatic statistical grouping of parsed Itrax results data to n groups. Also provides information on the most "representative" (central) of each group. These can be used to develop a sub-sampling regime for calibration using another method.

Usage

itrax_section(
  dataframe,
  divisions = 30,
  elementsonly = TRUE,
  zeros = "addone",
  transform = TRUE,
  plot = FALSE
)

Arguments

dataframe

pass the name of a dataframe parsed using "itrax_import()" or "itrax_join()" or "itrax_reduce()".

divisions

the number of groups to slice into - also the number of representative samples returned.

elementsonly

if TRUE, only chemical elements are included. If FALSE, the data is passed unfiltered, otherwise a character vector of desired variable names can be supplied.

zeros

if "addone", adds one to all values. If "limit", replaces zero values with 0.001. Otherwise a function can be supplied to remove zero values.

transform

binary operator that if TRUE will center-log-transform the data, if FALSE will leave the data untransformed. Otherwise, a function can be supplied to transform the data.

plot

set to true if a summary plot is required as a side-effect - the input dataset must have a depth or position variable - depth is used preferentially.

Value

the input data with additional columns 'group' and 'calib_sample', and possibly 'uid' if not supplied.

Examples

itrax_section(CD166_19_S1$xrf, plot = TRUE)
itrax_section(CD166_19_S1$xrf %>% itrax_reduce(by = 10), plot = TRUE)


itraxR documentation built on July 26, 2023, 5:48 p.m.

Related to itrax_section in itraxR...