# NOT RUN {
# Example 1
# -----------------------------------
# }
# NOT RUN {
data(breast.tumors)
X <- breast.tumors$gene.exp
Y <- breast.tumors$sample$treatment
splsda.breast <- splsda(X, Y,keepX=c(10,10),ncomp=2)
# calculating background for the two first components, and the centroids distance
background = background.predict(splsda.breast, comp.predicted = 2, dist = "centroids.dist")
# default option: note the outcome color is included by default!
plotIndiv(splsda.breast, background = background)
# }
# NOT RUN {
# Example 2
# -----------------------------------
# }
# NOT RUN {
data(liver.toxicity)
X = liver.toxicity$gene
Y = as.factor(liver.toxicity$treatment[, 4])
plsda.liver <- plsda(X, Y, ncomp = 2)
# calculating background for the two first components, and the mahalanobis distance
background = background.predict(plsda.liver, comp.predicted = 2, dist = "mahalanobis.dist")
plotIndiv(plsda.liver, background = background, legend = TRUE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab