Skip to contents

Instead of a summarized version of *.csv files from microparticle analysis software (like MicroplasticsFinder, MicroparticleAI, or siMPle). Like easyCHAMP(), this function provides a list of all particles. Blank correction is done with a most-similar-particle comparison.

Usage

easyCHAMP.particles(
  path,
  polymers = c("PU", "EVAc", "PA", "PAN", "PBT", "PET", "PE", "PMMA", "PP", "POM", "PS",
    "PVC", "PC", "ABS", "PPSU", "CA", "PEEK", "EVOH", "PSU", "SILICONE", "PLA",
    "PLAPBAT"),
  sizeclasses = c(10, 20, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500),
  divFactor = 1,
  colourSep = FALSE,
  dataReturn = FALSE,
  particleNumbers = FALSE,
  formFillDefault = FALSE,
  colourFillDefault = FALSE,
  labpreset = FALSE,
  noBlank = FALSE,
  test = FALSE,
  blankKey = "Blank",
  sep = ";",
  dec = ",",
  colPol = 6,
  colL = 17,
  colReqPol = 24,
  ReqPolKey = "ja",
  colShape = 25,
  colCol = 26,
  colLFib = 27,
  colArea = 4,
  colWidth = 18,
  fibre = "Faser",
  sphere = "Kugel",
  fragment = "Fragment",
  pixel = "Pixel",
  startrow = "auto"
)

Arguments

path

The path where the files can be found. All csv files in this folder will be evaluated. Also saves the resulting files in this directory.

polymers

A vector containing the abbreviations of polymers to be considered. Default vector contains 22 polymers.

sizeclasses

A vector containing desired sizeclasses to be evaluated. Default is c(10, 20, 50, 100, 150, 200, 250, 300, 350, 400, 450, 500). The function starts at 0 and then uses the set steps. It always uses values up to the provided higher number but excluding the former number (e.g., for the default values, the function uses 0 to <= 10, >10 to <= 20, >20 to <= 50, ..., all >500). However, since this function does not use just the length, but the length and width (or area), compared to easyCHAMP, The size classes are set in area, considering the provided size class as a square (e.g. 500 x 500 µm = 250000 µm^2). This is done, to simplify the setup. It is much easier to imagine a particle with the length of one edge, than a surface.

divFactor

Set a division factor, that is used to divide the results by this factor. All samples/filters and blanks must have the same factor (otherwise apply manually after running the function). Defaults to 1.

colourSep

Whether a special color of particles should be treated separately from other colours. Colours are usually difficult to distinguish in the FTIR pictures. But e.g., black and non-blacks are distinguishable. In some cases it is of interest to separately handle black particles (e.g., black foliage used in experiment). How the colour is named in Purency can be set here (e.g., "black" or "schwarz"). Defaults to FALSE, i.e., no separation.

dataReturn

If set TRUE, a data frame will be returned containing the data of all measurement with the necessary information.

particleNumbers

set TRUE if you would like to get an extra file with just plastic and non-plastic particle numbers for each file loaded.

formFillDefault

If desired you can provide a default form that will be filled in, if no form is provided in the data (NA). Should be one of the values of the parameters 'fibre', 'sphere', 'fragment' or 'pixel' (see below).

colourFillDefault

If desired you can provide a default colour that will be filled in, if no colour is provided in the data (NA).

labpreset

A preset for most of the parameters (except: path, polymers, dataReturn, eocsum). Can be requested by other labs, to be implemented, that they don't have to be set manually all the time.

noBlank

Can be set TRUE if you don't have a blank at all and just want to summarize your data (defaults to FALSE).

test

Can be set TRUE when the function should be run in testing mode.

blankKey

The key word to distinguish blanks from other measurements/samples. It is case sensitive to prevent accidental matching. Defaults to "Blank".

sep

Symbol in your *.csv files indicating new a column. Defaults to ';'.

dec

Symbol in your *.csv files indicating decimal sign. Defaults to ','.

colPol

Column number where the polymer type is stated. In the TOEKI lab this is column 6 (Class Name). The polymer names (or abbreviations) can be set manually in 'polymers' in case the default does not apply. Could also be provided as column name, but only in ASCII encoding (e.g., special character as . and ä = d).

colL

Column number for the particle length. In the TOEKI lab this is column 17 (Length 5µ). Could also be provided as column name, but only in ASCII encoding (e.g., special character as . and ä = d).

colReqPol

Column number for the particle check, whether the particle is a polymer or not. In the TOEKI lab this is column 24 (Plastik? or Plastik ja/nein). Could also be provided as column name, but only in ASCII encoding (e.g., special character as . and ä = d). If no curing took place, this parameter could be set to 'none' which will cause the function to simply use all particles in the file. Warning: this might cause further warnings or errors to occur, if a polymer is not an unknown substance (e.g., it is no polymer).

ReqPolKey

key word or sentence of 'colReqPol' that indicates that it is a plastic particle. Default is 'ja'.

colShape

Column number for the particle shape. In the TOEKI lab this is column 25 (Form). Could also be provided as column name, but only in ASCII encoding (e.g., special character as . and ä = d). Can also be set to 'none' if no column for shape exists in the files. This will cause the function to create one and set as 'fragment' as shape. However, this can be ignored afterwards.

colCol

Column number for the particle color In the TOEKI lab this is column 26 (Farbe). Could also be provided as column name, but only in ASCII encoding (e.g., special character as . and ä = d).

colLFib

Column number for the particle length in case of a fibre with corrected length (because of curvy shape) In the TOEKI lab this is column 27 (Länge). Could also be provided as column name, but only in ASCII encoding (e.g., special character as . and ä = d).

colArea

Column number for the particle length in case of a fibre with corrected length (because of curvy shape) In the TOEKI lab this is column 4 (Area µm²). Could also be provided as column name, but only in ASCII encoding (e.g., special character as . and ä = d).

colWidth

Column number for the particle length in case of a fibre with corrected length (because of curvy shape) In the TOEKI lab this is column 18 (Width µm). Could also be provided as column name, but only in ASCII encoding (e.g., special character as . and ä = d).

fibre

How fibres are called in colShape (Form). In the TOEKI lab it is 'Faser'.

sphere

How spheres are called in colShape (Form). In the TOEKI lab it is 'Kugel'.

fragment

How fragments are called in colShape (Form). In the TOEKI lab it is 'Fragment'.

pixel

How pixels are called in colShape (Form). In the TOEKI lab it is 'Pixel'.

startrow

Number of rows that can be omitted from the *.csv files. Usually preprocessing software provides a bunch of meta data, that are not of interest here. Usually 40 rows can be skipped (more or less - 0 in case of siMPle). This is automated now. However, automation can be disabled if a value is defined (e.g., for troubleshooting).

Value

If dataReturn = TRUE, the function returns a list object including all raw and processed data of each processing step and the summary values.

References

https://www.purency.ai/microplastics-finder, https://maki-science.github.io/easyCHAMP/index.html, https://simple-plastics.eu/

Examples

# For this example the path doesn't matter. 
# If you want to analyse your own data, set the path accordingly and 
# test = FALSE (or simply delete this parameter).
mydata <- easyCHAMP.particles(path="//HERE/COMES/YOUR/PATH/", dataReturn = TRUE, test = TRUE)
# Get the data frames of interest from the list
mydata.processedParticles <- mydata$processedSamples