average.spec.se: average replicate spectra within a directory of spectra files

View source: R/average.spec.se.R

average.spec.seR Documentation

average replicate spectra within a directory of spectra files

Description

Function to average replicate spectra within a directory of spectra files

Usage

average.spec.se(
  file.dir = NULL,
  out.dir = NULL,
  spec.type = NULL,
  spec.file.ext = NULL,
  start.wave = NULL,
  end.wave = NULL,
  step.size = NULL,
  bias.threshold = NULL,
  outlier.cutoff = 2,
  suffix.length = NULL,
  output.file.ext = NULL,
  settings.file = NULL
)

Arguments

file.dir

directory of spectra files to process

out.dir

output directory for processed spectra files

spec.type

Option to set what type of spectra to average. Options: Reflectance, Transmittance. Can be set with abbreviations: e.g. "Refl" or "Tran" Default is "Reflectance"

spec.file.ext

Optional to set the input file extension. Default is ".sed"

start.wave

starting wavelength of spectra files. Not needed if specified in XML settings file.

end.wave

ending wavelength of spectra files. Not needed if specified in XML settings file.

step.size

resolution of spectra files. E.g. 1 for 1nm, 5 for 5nm. Not needed if specified in XML settings file.

bias.threshold

reflectance/transmittance cutoff to remove spectra with anartificial bias (shift) due to improper spectral collection

outlier.cutoff

[Optional] Set upper/lower standard deviation cutoff to identify statistical Refl/Trans outliers within individual sample sets. Set as outlier.cutoff*Sample Sdev, e.g. 2.0*Sdev. Default 2.0

suffix.length

length of auto numbering attached to ASD file names. This number of characters will be removed from the filename when averaged.

output.file.ext

optional setting to set file extension of output files. Defaults to .csv

settings.file

settings file used for spectral processing options (OPTIONAL). Contains information related to the spectra collection instrument, output directories, and processing options such as applying a jump correction to the spectra files. Options in the settings file take precedent over options selected in the function call.

Author(s)

Shawn P. Serbin


serbinsh/R-FieldSpectra documentation built on March 31, 2022, 10:08 p.m.