as_spectra | R Documentation |
Convert matrix or data frame to spectra
as_spectra(x, name_idx = NULL, meta_idxs = NULL)
x |
matrix or dataframe. Samples are in rows and bands in columns. Any data that are not the spectra themselves (labels or metadata) must have their column index included in 'name_idx' or 'meta_idxs'. |
name_idx |
column index with sample names. Defaults to NULL. If NULL or 0, rownames(x) or a sequence of integers will be assigned as names. |
meta_idxs |
column indices with metadata (not name and not value). Defaults to NULL |
spectra object
Jose Eduardo Meireles
library(spectrolab) as_spectra(spec_matrix_example, name_idx = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.