R: Assign Group Membership and Colors for a Spectra Object

groupNcolor {ChemoSpec} | R Documentation

## Assign Group Membership and Colors for a Spectra Object

### Description

A utility function which looks for `gr.crit` in the file names of .csv files and assigns group membership (max 8 groups automatically). Also assigns a color, a symbol and an alternate symbol to each group. Warnings are given if there are file names that don't match entries in `gr.crit` or there are entries in `gr.crit` that don't match any file names. An internal function, not generally called by the user.

### Usage

    groupNcolor(spectra, gr.crit = NULL, gr.cols = c("auto"))

### Arguments

`spectra` | An object of S3 class `Spectra`. Until this function acts on `spectra` it is not quite complete.
`gr.crit` | As per `files2SpectraObject`.
`gr.cols` | As per `files2SpectraObject`.

### Value

A complete object of S3 class `Spectra`. This function is the last internal step in creating a `Spectra` object. Until this function has done its job, an object of class `Spectra` will not pass checks as the assembly is not complete (see `chkSpectra`).

### Author(s)

Bryan A. Hanson, DePauw University.

### References

https://github.com/bryanhanson/ChemoSpec

### See Also

`files2SpectraObject` for details; `sumGroups` to see the outcome.

[Package ChemoSpec version 4.4.97 Index]