Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dot-fileio.optional

Helper function to harmonize treatment of file import results


Description

This function provides two ways of post-processing imported spectra:

Usage

.fileio.optional(
  spc,
  filename,
  ...,
  file.remove.emptyspc = hy.getOption("file.remove.emptyspc"),
  file.keep.name = hy.getOption("file.keep.name"),
  tolerance = hy.getOption("tolerance")
)

Arguments

spc

hyperSpec object for file import post-processing

filename

filename(s) to become extra data column of 'spc'

...

(ignored)

file.remove.emptyspc

should empty (all 'NA' or all '0') spectra be removed?

file.keep.name

should file names be kept and put into 'spc$filename'?

tolerance

intensities in +/- 'tolerance' are considered '0' for 'file.remove.emptyspc = TRUE'

Details

- optionally remove empty spectra (some spectrograph software will produce empty spectra when measurements are cancelled) - optionally keep the filenames in column 'spc$filename'

The desired overall behavior can be set by options via [hy.setOptions()]. All file import filters should call '.fileio.optional()' to ensure the same behavior.

Value

hyperSpec object


hyperSpec

Work with Hyperspectral Data, i.e. Spectra + Meta Information (Spatial, Time, Concentration, ...)

v0.100.0
GPL (>= 3)
Authors
Claudia Beleites [aut, cre, dtc] (<https://orcid.org/0000-0003-1626-154X>), Valter Sergo [aut], Alois Bonifacio [ctb, dtc], Marcel Dahms [ctb], Björn Egert [ctb], Simon Fuller [ctb], Vilmantas Gegzna [ctb], Rustam Guliev [ctb], Bryan A. Hanson [ctb], Michael Hermes [ctb], Martin Kammer [dtc], Roman Kiselev [ctb], Sebastian Mellor [ctb]
Initial release
2021-09-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.