Learn R Programming

ChemoSpecUtils (version 1.0.4)

sumSpectra: Summarize a Spectra or Spectra2D Object

Description

Provides a summary of a Spectra or Spectra2D object, essentially a more spectroscopist-friendly version of str().

Usage

sumSpectra(spectra, ...)

Value

None. Results printed at console.

Arguments

spectra

An object of S3 class ChemoSpec::Spectra() or ChemoSpec2D::Spectra2D().

...

Arguments to be passed downstream. Main use is to pass a value for tol to function check4Gaps when using ChemoSpec. Not used in ChemoSpec2D.

Author

Bryan A. Hanson (DePauw University).

Details

Prior to summarizing, chkSpectra is run with confirm = FALSE. If there are problems, warnings are issued to the console and the summary is not done. The Spectra or Spectra2D object is checked to see if it contains data elements beyond what is required. If so, these extra elements are reported to the console.

Examples

Run this code
if (checkForPackageWithVersion("ChemoSpec", 6.0)) {
  library("ChemoSpec")
  data(SrE.IR)
  sumSpectra(SrE.IR)
}

if (checkForPackageWithVersion("ChemoSpec2D", 0.5)) {
  library("ChemoSpec2D")
  data(MUD1)
  sumSpectra(MUD1)
}

Run the code above in your browser using DataLab