#load iris data
data(iris)
#Define grouping variable, grouping the observations by whether their species is
#Setosa or not
iris$group <- "setosa"
iris$group[iris$Species != "setosa"] <- "non-setosa"
iris$Species <- NULL
## Not run: ------------------------------------
# #make a PCADSC object, splitting the data by "group"
# irisPCADSC <- PCADSC(iris, "group")
#
# #make a partial PCADSC object from iris and fill out CEInfo in the next call
# irisPCADSC2 <- PCADSC(iris, "group", doCE = FALSE)
# irisPCADSC2 <- doCE(irisPCADSC2)
#
# #make a CE plot
# CEPlot(irisPCADSC)
# CEPlot(irisPCADSC2)
## ---------------------------------------------
#Only do CE information and use less resamplings for a faster runtime
irisPCADSC_fast <- PCADSC(iris, "group", doAngle = FALSE, doChroma = FALSE,
B = 1000)
CEPlot(irisPCADSC_fast)
Run the code above in your browser using DataLab