# NOT RUN {
data(liver.toxicity)
spca.rat <- spca(liver.toxicity$gene, ncomp = 3, keepX = rep(50, 3))
spca.rat
## variable representation
plotVar(spca.rat, cex = 0.5)
# }
# NOT RUN {
plotVar(spca.rat,style="3d")
# }
# NOT RUN {
## samples representation
plotIndiv(spca.rat, ind.names = liver.toxicity$treatment[, 3],
group = as.numeric(liver.toxicity$treatment[, 3]))
# }
# NOT RUN {
plotIndiv(spca.rat, cex = 0.01,
col = as.numeric(liver.toxicity$treatment[, 3]),style="3d")
# }
# NOT RUN {
# example with multilevel decomposition and CLR log ratio transformation
# ----------------
# }
# NOT RUN {
data("diverse.16S")
pca.res = pca(X = diverse.16S$data.TSS, ncomp = 5,
logratio = 'CLR', multilevel = diverse.16S$sample)
plot(pca.res)
plotIndiv(pca.res, ind.names = FALSE, group = diverse.16S$bodysite, title = '16S diverse data',
legend=TRUE)
# }
Run the code above in your browser using DataLab