This could be a bug or maybe I am doing some basic mistake – could you have a look?
The following code generates a scores plot of a PLS-DA model to discriminate between animals according to their Time.Group
data(liver.toxicity)
X = liver.toxicity$gene
Y = as.factor(liver.toxicity$treatment[, 4])
plsda.liver <- plsda(X, Y, ncomp = 2)
plotIndiv(plsda.liver, legend=TRUE)
It looks like the legend is misleading. For example, the orange dots in the top left belong to animals 404, 405, 505, 506, 516. They are colour-coded as belonging to the “6 hours” group, but according to the data, they are all in the “18 hours” group:
liver.toxicity$treatment[,c(1,4)]
I am running mixOmics 6.12.0 on R 4.0.0
Could you check? Thanks a lot in advance
Cheers
Axel