hy2mat: Extract matrix from either 'hyperSpec' object or a matrix

View source: R/hy2mat.R

hy2matR Documentation

Extract matrix from either hyperSpec object or a matrix

Description

hy2mat

Usage

hy2mat(sp)

Arguments

sp

Spectroscopic data (either a hyperSpec object or a matrix).

Value

Either a matrix or an error, if it's impossible to extract a matrix.

Author(s)

Vilmantas Gegzna

See Also

Other spHelper functions for spectroscopy and hyperSpec: IQR_outliers(), binning(), file, gapDer(), hyAdd_Label_wl(), hyAdd_Labels_PAP_PD_2014(), hyAdd_Labels_TD2009(), hyAdd(), hyDrop_NA(), hyGet_palette(), hyRm_palette(), mad_outliers(), mean_Nsd(), median_Nmad(), plot_hyPalette(), prepare_PAP_RK_2014__MATLAB_failui(), read.OOIBase32(), read.OceanView.header(), read.OceanView(), read.sp.csv2(), read3csv2hy(), replace_spc(), sd_outliers(), spStat(), sp_class_perform()

Examples


data(flu, package = "hyperSpec")

flu
a <- hy2mat(flu)
b <- hy2mat(flu$spc)

identical(a,b)
## [1] TRUE


hy2mat(matrix(NA,5,10))


GegznaV/spHelper documentation built on April 16, 2023, 1:42 p.m.