#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 full PCADSC object, splitting the data by "group"
# irisPCADSC <- PCADSC(iris, "group")
#
# #The three plotting functions can now be called on irisPCADSC:
# CEPlot(irisPCADSC)
# anglePlot(irisPCADSC)
# chromaPlot(irisPCADSC)
#
# #Make a partial PCADSC object with no angle plot information and add
# #angle plot information afterwards:
# irisPCADSC2 <- PCADSC(iris, "group", doAngle = FALSE)
# irisPCADSC2 <- doAngle(irisPCADSC)
## ---------------------------------------------
#Make a partial PCADSC obejct with no plotting (angle/CE/chroma)
#information:
irisPCADSC_minimal <- PCADSC(iris, "group", doAngle = FALSE,
doCE = FALSE, doChroma = FALSE)
Run the code above in your browser using DataLab