Description Usage Arguments Value
For long spectra we may want to either 1) subsample to lower
resolution, so that plots can be made more quickly, or 2) filter down to
a specified range of indices, to understand smaller scale phenomena. The
first task here can be accomplished by setting subsample_frac; for example,
setting subsample_frac = 1/2 will return the spectrum matrix filtered to
every other column. For the second task, we require the columns of
spectra
to be numeric, so we can filter cols on whether they are
between x_min and x_max.
1 2 | subsample_spectra_cols(spectra_matrix, subsample_frac = 1, x_min = NULL,
x_max = NULL)
|
spectra_matrix |
An object of class matrix, containing the spectral samples as rows. |
subsample_frac |
We will only plot ever the value at every 1 / subsample_frac indices. This can accelerate plotting in the case that the spectrum is very long, but can lead to missed peaks. |
x_min |
What is the minimum index to display? |
x_max |
What is the maximum index to display? |
spectra_matrix A matrix with the same number of rows as the input, but with filtered columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.