| getSubsetVi {ropls} | R Documentation |
Extracts the indices of the samples used for building the model (when a subset argument has been specified)
getSubsetVi(object, ...) ## S4 method for signature 'opls' getSubsetVi(object)
object |
An S4 object of class |
... |
Currently not used. |
Integer vector with the indices of the samples used for training
Etienne Thevenot, etienne.thevenot@cea.fr
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)