data(liver.toxicity)
spca.rat <- spca(liver.toxicity$gene, ncomp = 3, keepX=rep(50,3))
spca.rat
# variable representation
plotVar(spca.rat, X.label = TRUE, cex = 0.5)
plot3dVar(spca.rat)
# samples representation
plotIndiv(spca.rat, ind.names = liver.toxicity$treatment[,3], cex = 0.5, col = as.numeric(liver.toxicity$treatment[,3]))
plot3dIndiv(spca.rat, col = as.numeric(liver.toxicity$treatment[,3]), cex = 0.01)Run the code above in your browser using DataLab