Skip to contents

Wrapper function for streamlined load-in of spectrolyzer data. Enables load-in of multipe scpectrolyzer-zip-files or already un-zipped files to coherent tibble [Experimental]

Usage

Spectro_batch_load(
  parent_dir,
  wavelengths = seq(200, 750, 2.5),
  sel_wavelengths = seq(200, 722.5, 2.5),
  zip = T,
  exclude = NA,
  read_param = FALSE
)

Arguments

parent_dir

path of folder containing the zip- or un-zipped files

wavelengths

col-names of measured wavelengths. default is 200-750 in 2.5 m, steps. Details see Spectro_load_fingerprint

sel_wavelengths

Range of wavelengths that shall be returned. Details see Spectro_load_fingerprint

zip

Boolean. Are zip-files (T) in parent_dir, or are folders already unzipped(F)? Default is zip=T.

exclude

Optional character vector of subfolders to be disregarded.

read_param

If TRUE, parameter fiels are read in, else skipped (...fix issues before setting TRUE) If so, list them in a vector and they will be disregarded.

Value

A tibble that contains all fingerprint and parameter data, joined by Serial_No and Date_Time. Duplicated mearsurements (i.e, by overlapping spectrolyzer data downloads) are removed. Spectra are saved as nested tibble in spc.

Details

Note that there might be a many-to-many relations warning when merging the individual spectrolyzer subsets. This is expected and duplicates are removed before returning the dataset.

Note

if zip files are loaded, the unzipped folders are put in a new parent folder called "data" inside of the original directory