chkSpectra {ChemoSpecUtils}R Documentation

Verify the Integrity of a Spectra or Spectra2D Object

Description

Utility function to verify that the structure of a Spectra or Spectra2D object is internally consistent. This function should be used after manual editing of these objects. However, in most cases rather than directly editing these objects, one should modify them via:

Usage

chkSpectra(spectra, confirm = FALSE)

Arguments

spectra

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

confirm

Logical indicating whether or not to write the results to the console, as would be desirable for interactive use.

Value

None. When used at the console, and the object is OK, no message is written unless confirm = TRUE. At the console, if there is a problem, messages are issued regardless of the value of confirm.

Author(s)

Bryan A. Hanson (DePauw University).

Examples

if (checkForPackageWithVersion("ChemoSpec", 6.0)) {
  library("ChemoSpec")
  data(SrE.IR)
  chkSpectra(SrE.IR)
}

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

[Package ChemoSpecUtils version 1.0.4 Index]