Samples representation
Individual plots for the first 2 components
## Set the colors of the samples with respect to the genotype ## We will use the genotype as color col.nutri = as.numeric(nutrimouse$genotype) col.nutri[col.nutri == 1] <- 'blue' col.nutri[col.nutri == 2] <- 'red' ## And the diet type as a label for the points plotIndiv(result, comp = 1:2, ind.names = nutrimouse$diet, col = col.nutri)
![](http://www.math.univ-toulouse.fr/~biostat/mixOmics/images/cs_nutri_plotIndiv_final.png)
rCCA highlights interesting patterns in the two data sets (genes and lipids): there is a clear distinction between the two genotypes and we also observe some differences between the 5 different types of diets. The first dimension of rCCA tend to differentiate the genotype and the second dimension the different types of diet.
We can even visualize it in 3D, where we changed the attributes of the graph with a sphere for the wild type, and tetrahedron for the PPAR. The color is now chosen according to the diet:
pch <- c(rep("s", 20), rep("t", 20)) col <- nutrimouse$diet plot3dIndiv(result, ind.names = FALSE, axes.box = "both", col = col, cex = 1.5, pch = pch) ## The figure can be rotated to better highlight the groups
![](http://www.math.univ-toulouse.fr/~biostat/mixOmics/images/cs_nutri_plot3dIndiv.png)