
Calculate elements for the CatPCA biplot
CatPCA.biplot.RdThis function performs calculations for the construction of a CatPCA biplot.
Arguments
- bp
an object of class
biplotobtained from preceding functionbiplot().- cat.type
a vector indicating whether each categorical variables is
nominalorordinal.- dim.biplot
the dimension of the biplot. Only values
1,2and3are accepted, with default2.- e.vects
the vector indicating which eigenvectors (principal components) should be plotted in the biplot, with default
1:dim.biplot.- group.aes
a vector of the same length as the number of rows in the data matrix for differentiated aesthetics for samples.
- show.class.means
a logical value indicating whether group means should be plotted in the biplot.
- epsilon
convergence criteria for iterative algorithm with defaults 1e-6.
Examples
biplot(iris) |> CatPCA()
#> Object of class biplot, based on 150 samples and 5 variables.
#> 4 numeric variables.
#> 1 categorical variable.
# create a CatPCA biplot
biplot(data = iris) |> CatPCA() |> plot()
#> Warning: The ggplot2 engine does not yet support catPCA nominal/ordinal axes; falling back to base graphics.
#> Error in scale.default(Xhat, center = -1 * x$means, scale = FALSE): length of 'center' must equal the number of columns of 'x'