Description Usage Format Details Fields Methods See Also Examples

The `R6Class`

object `elementR_project`

contains all the information needed for running an elementR session

1 |

An `R6Class`

generator object

The `elementR_project`

structure allows to organized data in a session framework, faciliting therefore numerous major functionalities: handling as many standard replicates as wanted, machine drift verification and correction, sample replicate realignment and averaging. Moreover, this object can be easily exported, allowing user to re-open it later for finishing or editing final results.

`name`

A character string corresponding to the name of the project

`folderPath`

A character string corresponding to the path of the project

`standardsPath`

A character string corresponding to the path of the standard folder

`standardsFiles`

A vector containing the names of each standard file

`standards`

A list containing the

`elementR_repStandard`

of each type of standard

`samplesPath`

A character string corresponding to the path of the sample folder

`samplesFiles`

A vector containing the names of each sample file

`samples`

A list containing the

`elementR_repSample`

of each sample

`EtalonPath`

A character string corresponding to the path of the calibration file

`EtalonData`

A matrix corresponding to the calibration data

`listeElem`

A vector containing the names of the chemical elements included in the project

`flag_stand`

A vector indicating which standards have been filtered

`flag_Sample`

A vector indicating which samples have been filtered

`flagRealign`

A list vectors indicating which samples have been realigned or averaged

`standardRank`

A vector corresponding to the standard rank in ICPMS analysis

`sampleRank`

A vector corresponding to the sample rank in ICPMS analysis

`elementChecking`

A list indicating the number and the location of the error(s) of structure within data included in the project

`errorSession`

A numerical value indicating the non numeric error(s) within data included in the project

`regressionModel`

A matrix summarizing, for each chemical element, the parameters of the linear regression corresponding to the machine drift

`machineCorrection`

A vector summarizing the chemical element(s) to correct from machine drift

`flagMachineCorrection`

A numerical value indicating the validation of the machine correction step

`nbCalib`

A vector corresponding to the number of standard values available for each chemical element to proceed the linear regression

`elemStand`

A character string indicating the chemical element considered as internal standard (by default = Ca)

`summarySettings`

A matrix summarizing all the parameters set by user for each replicate (sample and standard)

`ChoiceUserCorr`

A logical value corresponding to the choice of the user to correct or no the session based on the first step of configuration

`R2Threshold`

the threshold to switch the machine drift correction from a linear to a neighbor correction

`set_summarySettings(name, rank, bins, plat1, plat2, average, LOD)`

Aim: set

`summarySettings`

; Arguments: name = a character string corresponding to the name of the replicate to set, rank= its rank in ICPMS analysis, bins = a numerical value corresponding to the time at which end the blank values, plat1 = a numerical value corresponding to the time at which begin the plateau values, plat2 = a numerical value corresponding to the time at which end the plateau values, average = a vector corresponding to the blank averaged value (here,`BlankAverarge`

) for each chemical element of the considered replicate, LOD = a vector corresponding to the limit of detection (here,`LOD`

) for each chemical element of the considered replicate

`is.integer0(x)`

Aim: test the integer(0); Arguments: x = a vector to test; Outputs: TRUE or FALSE

`closest(x,y)`

Aim: find the nearest value among a vector of numerical data; Arguments: x = a vector of numerical values, y = the investigated value; Output: val = a list of two values: the nearest value and its place within the vector

`PlotIC(name, Mean,SD, coord, lengthSeg, xlim, ylim, type = "p", xlab, ylab)`

Aim: plot mean +/- SD; Arguments: name = a vector of the names to display on xaxis, Mean = a vector of mean, SD = a vector of SD, coord = a vector of coordonnates to place xticks, lengthSeg = a numeric value cooresponding to the length of the top segment of the SD bar, xlim & ylim = the limits of plots, xlab & ylab = the labels of axis

`setEtalon(x, sep, dec)`

Aim: define

`EtalonPath`

and`EtalonData`

and check the validity of their data structure; Arguments: x = a character string corresponding to the path of the calibration file, dec = the decimal system of the data, sep = the separator character of the data

`setflagMachineCorrection(x)`

Aim: set

`flagMachineCorrection`

; Arguments: x = the numerical value to set

`NonNumericCheck(data, col)`

Aim: check non numeric characters of data; Arguments: data = a dataframe or a matrix, col = a vector of numerical values corresponding to the column(s) to investigate; Output: errB = a numerical value corresponding to the number of cells containing non numeric characters

`setflagStand(place, value)`

Aim: set

`flag_stand`

; Arguments: place = a numerical value corresponding to the considered replicate, value = the numerical value to set

`setflagSample(sample, replicate, value)`

Aim: set

`flag_Sample`

; Arguments: sample = a numerical value corresponding to the considered sample, replicate = a numerical value corresponding to the considered replicate, value = the numerical value to set

`setCorrection(x)`

Aim: set

`machineCorrection`

; Arguments: x = a vector indicating the chemical elements to correct from machine drift

`correction()`

Aim: proceed to the linear regression on standards replicates and set

`nbCalib`

&`regressionModel`

`setRank(type, value)`

Aim: set the order in which ICPMS runs each standard (

`standardRank`

) and sample (`sampleRank`

) replicates; Arguments: type = a character string indicating the type of replicate standard ("standard") or sample ("sample"), value = a numerical value corresponding to the rank of the considered replicate

`set_flagRealign(replicate, type, value)`

Aim: set

`flagRealign`

; Arguments: replicate = a numerical value corresponding to the number of the considered replicate, type = a character string indicating the raster or spot mode, value = the numerical value to set

`setElemStand(elem)`

Aim: define

`elemStand`

and transmit this value to all`elementR_rep`

and`elementR_data`

objects inlcuded in the project; Arguments: elem = a character string corresponding to the element considered as intern standard

`initialize(folderPath, sep, dec)`

Aim: create the project; Arguments: filePath = the path of the considered project, dec = the decimal system of the data, sep = the separator character of the data; Outputs: R6Class

`elementR_project`

`set_ChoiceUserCorr(x)`

Aim: information about the will of user to check or not the machine drift; Arguments: x = T (for checking machine drift), F (for not checking machine drift)

`setR2Threshold(x)`

Aim: set

`R2Threshold`

; Arguments: x = a value between 0 and 1

`insert.at(a, pos, toInsert)`

Aim: insert values in vectors; Arguments: a = a vector, pos = the position to insert, toInsert = a vector to insert

`detectPlateau(dat, col)`

Aim: detection of the plateau limits of a matrix based on clustering methods and on the internal standard element; Arguments: dat = the data to proceed, col = the column used for the detection

`detectBlank(dat, col)`

Aim: detection of the blank limits of a matrix based on the derivative value and on the internal standard element; Arguments: dat = the data to proceed, col = the column used for the detection

1 2 3 4 5 6 7 8 9 10 | ```
## create a new elementR_repStandard object based on the "filePath"
## from a folder containing sample replicate
# filePath <- system.file("Example_Session", package="elementR")
# exampleProject <- elementR_project$new(filePath)
## Display the raw data
# exampleProject$samplesFiles
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.