chkSpectra: Verify the Integrity of a Spectra or Spectra2D Object

Description Usage Arguments Value Author(s) Examples

View source: R/chkSpectra.R

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

1
chkSpectra(spectra, confirm = FALSE)

Arguments

spectra

An object of S3 class Spectra or 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
if (checkForPackageWithVersion("ChemoSpec", "5.1")) {
  library("ChemoSpec")
  data(SrE.IR)
  chkSpectra(SrE.IR)
}

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

ChemoSpecUtils documentation built on March 16, 2021, 1:08 a.m.