replace_spc: [!!!] Replace 'object$spc' and 'colnames(object$spc)'

View source: R/replace_spc.R

replace_spcR Documentation

[!!!] Replace object$spc and colnames(object$spc)

Description

[!!!] Replace object$spc and colnames(object$spc)

Usage

replace_spc(object, x, ...)

Arguments

object

A hyperSpec object.

x

matrix with the new content for object@data$spc.

Its size must correspond to rows (for scores) and to either columns or rows (for loadings) of object.

...

further arguments to decomposition

Value

A hyperSpec object, updated according to x

Author(s)

Vilmantas Gegzna

See Also

decomposition

Other spHelper functions for spectroscopy and hyperSpec: IQR_outliers(), binning(), file, gapDer(), hy2mat(), 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(), sd_outliers(), spStat(), sp_class_perform()

Examples


ratios <- colRatios(Scores2[[]])
obj1 <- replace_spc(Scores2, ratios)

colnames(obj1$spc)  # preserved

obj2 <- decomposition(Scores2, ratios)
colnames(obj2$spc)  # NOT preserved



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