do_emsc: Perform EMSC

View source: R/gen_coreDataManip.r

do_emscR Documentation

Perform EMSC

Description

Performs EMSC with up to two signals on the provided dataset

Usage

do_emsc(dataset, vecLoad = NULL, exportModel = FALSE)

Arguments

dataset

An object of class 'aquap_data" as produced by gfd or as can be extracted from a 'cube' via getcd.

vecLoad

A data frame x (ncol(x) <= 2) with one or two loading vectors or one regression vector.

exportModel

Logical. If a possible model should be stored in the set, (leave at FALSE).

Details

A data frame with one or two loadings or with one regression vector can be used as input to (try to) remove the effect on the data described by said loadings / regr. vector. For example, from a pca-model the first and second loading vector can be extracted with pcaModel$loadings[, c(1,2)].

Value

Returns the dataset with the transformed NIR data.

See Also

getcm for easy extraction of single models where loading vectors or a regression vector can be obtained.

Other Data pre-treatment functions: [,aquap_data-method, do_addNoise(), do_avg(), do_blowup(), do_detrend(), do_gapDer(), do_msc(), do_resampleNIR(), do_sgolay(), dpt_modules, selectWls(), ssc()

Other dpt modules documentation: do_detrend(), do_gapDer(), do_msc(), do_sgolay(), do_snv(), dpt_modules

Examples

## Not run: 
fd <- gfd()
cu <- gdmm(fd, getap(do.pca=TRUE)) # assumes no split
loadings <- getcm(cu, 1, what="pca")$loadings[, c(1,2)]
fd_emsc <- do_emsc(fd, loadings)

## End(Not run)

bpollner/aquap2 documentation built on March 29, 2024, 7:33 a.m.