concat.spectra: Concatenate a directory of spectra files into a single .csv...

View source: R/spec.utils.R

concat.spectraR Documentation

Concatenate a directory of spectra files into a single .csv file. Works on a single directory or a series of directories

Description

Concatenate a directory of spectra files into a single .csv file. Works on a single directory or a series of directories

Usage

concat.spectra(
  file.dir = NULL,
  out.dir = NULL,
  out.filename = NULL,
  in.file.ext = ".csv",
  out.file.ext = ".csv",
  transpose = FALSE,
  spec.dataframe = FALSE
)

Arguments

file.dir

directory of spectra files to process. Currently works on spectra files formatted where each row is a wavelength and associated spectral observation.

out.dir

output directory for concatenated spectra files. If not set then the output directory defaults to file.dir (input directory)

out.filename

filename for concatenated spectra files

in.file.ext

file extension for individual spectra files. Defaults to ".csv"

out.file.ext

option to set the output extension. Defaults to ".csv"

transpose

option to transpose the spectra to/from row/column major output. This will be applied to both the returned dataframe (optional) and output file. TRUE/FALSE. Default FALSE

spec.dataframe

option toreturn a R dataframe containing the concatenated spectral data. TRUE/FALSE

Author(s)

Shawn P. Serbin

Examples

## Not run: 
concat.spectra()
spectra <- concat.spectra(file.dir=file.dir,out.dir=out.dir,out.filename="concat.spectra",
out.file.ext=".csv",transpose=FALSE,spec.dataframe=FALSE)

## End(Not run)


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