doAngle: Compute angle information

View source: R/doAngle.R

doAngleR Documentation

Compute angle information

Description

Computes the information that is needed in order to make an anglePlot from a PCADSC or pcaRes object. Typically, this function is called on a partial PCADSC object in order to add angleInfo (see examples).

Usage

doAngle(x, ...)

Arguments

x

Either a PCADSC or a pcaRes object.

...

If doCE is called on a pcaRes object, the full dataset must also be supplied (as data), as well as the number of resampling steps (B).

See Also

anglePlot, PCADSC

Examples

#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 partial PCADSC object, splitting the data by "group"
irisPCADSC <- PCADSC(iris, "group", doAngle = FALSE)

#No angleInfo available
irisPCADSC$angleInfo

#Add and show angleInfo
irisPCADSC <- doAngle(irisPCADSC)
irisPCADSC$angleInfo

## End(Not run)

#Make a partial PCADSC object and only add angle information for a
#faster runtime
irisPCADSC_fast <- PCADSC(iris, "group", doAngle = FALSE,
  doChroma = FALSE, doCE = FALSE)
irisPCADSC_fast <- doAngle(irisPCADSC_fast, B = 100)
irisPCADSC_fast$angleInfo


AnnePetersen1/PCADSC documentation built on May 3, 2022, 4:33 a.m.