Learn R Programming

ChemoSpecUtils (version 1.0.5)

sumGroups: Summarize the Group Membership of a Spectra or Spectra2D Object

Description

This function summarizes the group membership of a Spectra or Spectra2D object.

Usage

sumGroups(spectra)

Value

A data frame as follows. Note that if there are groups with no members these are dropped.

group

The name of the group.

no.

The number in the group.

color

The color assigned to the group.

symbol

The symbol assigned to the group. Spectra objects only.

alt.symbol

The alternative symbol assigned to the group. Spectra objects only.

Arguments

spectra

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

Author

Bryan A. Hanson (DePauw University).

See Also

To summarize the entire object, sumSpectra.

Examples

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

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

Run the code above in your browser using DataLab