| getcm | R Documentation |
Get a single model, referenced by its index and specified by the
argument what from the 'cube' object, i.e. the object generated by
gdmm.
getcm(cube, index, what = "pca")
cube |
An object as created by |
index |
The index of the dataset to be obtained. See the leftmost rowname of the 'cube' object. |
what |
Character length one, see details. |
The default for what is "pca. Provide any of
'pca', 'simca', 'plsr', 'aquagr' to obtain its corresponding model. Possible
values for what are:
Gives the back the pca-model of the selected dataset from the cube
Gives back the simca-model of the selected dataset from the cube
Gives back the plsr-model of the selected dataset from the cube
To extract e.g. two loading vectors from a pca-model, you could use a code like
loadingVectors <- pcaModel$loadings$[, c(1,2)] to extract the first two
loading vectors from the model - see examples.
do_emsc, dpt_modules
Other Helper Functions:
ap2_settings_setup(),
ap2dme(),
export_ap2_ToXlsx(),
export_header_toXls(),
genFolderStr(),
genNoiseRecExp(),
genTempCalibExp(),
getcd(),
getstn(),
printStdColnames(),
reColor(),
saveAQdata(),
siWlg(),
updateSettings()
Other Extract Elements:
getHeader(),
getWavelengths,aquap_data-method,
getcd(),
siWl(),
siWlg()
## Not run:
fd <- gfd()
cube <- gdmm(fd)
# assumes that in the analysis procedure we have a split variable defined.
fd_3_pca <- getcm(cube, 3)
str(fd_3_pca)
ld12 <- fd_3_pca$model$loadings[, c(1,2)] # extract the first two loadings
ld24 <- fd_3_pca$model$loadings[, c(2,4)] # extract loadings 2 and 4
fd_2_pls <- getcm(cube, 2, "pls")
str(fd_2_pls)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.