Learn R Programming

spectrolab (version 0.0.18)

as.matrix.spectra: Convert spectra to matrix

Description

Convert spectra to matrix

Usage

# S3 method for spectra
as.matrix(x, fix_names = "none", ...)

Value

matrix of spectral value. columns are bands and rows are samples

Arguments

x

spectra object

fix_names

Use make.names to normalize names? Pick one: "none" "row" "col" "both".

...

does nothing. Here for compatibility with S3 generics

Author

Jose Eduardo Meireles

Examples

Run this code
library(spectrolab)
spec = as_spectra(spec_matrix_example, name_idx = 1)
mat  = as.matrix(spec)

Run the code above in your browser using DataLab