Description Usage Arguments Value Author(s) Examples

View source: R/subsetSpectra.R

This function accepts an object containing spectra and subsets it to a specified region(s).

1 | ```
subsetSpectra(spec, ranges)
``` |

`spec` |
An object of class |

`ranges` |
A two column matrix, each row contains max and min range values. Alternatively, a list, where each element is a vector of length 2, specifying the range (max/min) of a spectral region to select. Should be in the same units as your spectra (e.g., wavenumbers). |

Returns an object of class `spectra.list`

.

Daniel M Griffith

1 2 3 4 5 6 7 8 9 10 | ```
## Not run:
data(shootout)
s_mat <- matrix(data = c(2000,1750,1000,500), nrow = 2, ncol = 2, byrow = T)
sub_data <- subsetSpectra(spec = shootout_scans, ranges = s_mat)
par(mfrow=c(1,2))
plot(shootout_scans)
plot(sub_data)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.