Learn R Programming

metaX (version 1.4.0)

selectBestComponent: Select the best component for PLS-DA

Description

Select the best component for PLS-DA

Usage

selectBestComponent(para, np = 10, sample = NULL, t = 1, method = "oscorespls", scale = NULL, center = TRUE, valueID = "valueNorm", validation = "CV", k = 7, ...)

Arguments

para
A metaXpara object
np
The number of max component
sample
The sample class used
t
Method used to transform the data
method
See plsr
scale
Method used to scale the data
center
Centering
valueID
The name of column contained the data
validation
See plsr
k
k-fold
...
Additional parameter

Value

A list

Examples

Run this code
para <- new("metaXpara")
pfile <- system.file("extdata/MTBLS79.txt",package = "metaX")
sfile <- system.file("extdata/MTBLS79_sampleList.txt",package = "metaX")
rawPeaks(para) <- read.delim(pfile,check.names = FALSE)
sampleListFile(para) <- sfile
para <- reSetPeaksData(para)
para <- missingValueImpute(para)
selectBestComponent(para,np=10,sample=c("S","C"),scale="uv",valueID="value")

Run the code above in your browser using DataLab