# NOT RUN {
data(feems)
cube <- feemscale(
feemscatter(
feemcube(feems, FALSE)[1:36*5, 1:11*5,],
rep(24, 4)), na.rm = TRUE
)
factors <- feemparafac(cube, nfac = 2, const = rep('nonneg', 3))
# calls plot.feemcube for estimated spectra
plot(fitted(factors))
plot(resid(factors))
# }
Run the code above in your browser using DataLab