Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getSubsetVi

getSubsetVi method for (O)PLS(-DA) models


Description

Extracts the indices of the samples used for building the model (when a subset argument has been specified)

Usage

getSubsetVi(object, ...)

## S4 method for signature 'opls'
getSubsetVi(object)

Arguments

object

An S4 object of class opls, created by opls function.

...

Currently not used.

Value

Integer vector with the indices of the samples used for training

Author(s)

Etienne Thevenot, etienne.thevenot@cea.fr

Examples

data(sacurine)
attach(sacurine)

predictorMN <- dataMatrix
responseFc <- sampleMetadata[, "gender"]

sacurine.plsda <- opls(predictorMN,
                       responseFc,
                       subset = "odd")

trainVi <- getSubsetVi(sacurine.plsda)

table(responseFc[trainVi], fitted(sacurine.plsda))

detach(sacurine)

ropls

PCA, PLS(-DA) and OPLS(-DA) for multivariate analysis and feature selection of omics data

v1.22.0
CeCILL
Authors
Etienne A. Thevenot <etienne.thevenot@cea.fr>
Initial release
2020-03-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.