object$spc
and colnames(object$spc)
replace_spc.Rd
[!!!] Replace object$spc
and colnames(object$spc)
replace_spc(object, x, ...)
A hyperSpec
object.
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
A hyperSpec
object, updated according to x
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()
ratios <- colRatios(Scores2[[]])
obj1 <- replace_spc(Scores2, ratios)
colnames(obj1$spc) # preserved
#> [1] "k_308nm / k_419nm" "k_308nm / k_421nm" "k_308nm / k_495nm"
#> [4] "k_308nm / k_582nm" "k_419nm / k_421nm" "k_419nm / k_495nm"
#> [7] "k_419nm / k_582nm" "k_421nm / k_495nm" "k_421nm / k_582nm"
#> [10] "k_495nm / k_582nm"
obj2 <- decomposition(Scores2, ratios)
colnames(obj2$spc) # NOT preserved
#> [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10"