Learn R Programming

Factoshiny (version 2.5)

PCAshiny: Principal Component Analysis (PCA) with FactoShiny

Description

Performs Principal Component Analysis (PCA) with supplementary individuals, supplementary quantitative variables and supplementary categorical variables on a Shiny application.
Allows to change PCA parameters and graphical parmeters.
Graphics can be downloaded in png, jpg, pdf and emf.

Usage

PCAshiny(X)

Value

Returns several tabs:

Graphs

a tab containing the individuals factor map and the variables factor map.

Values

a tab containing the summary of the PCA performed, the eigenvalues, the results for the variables, the results for the individuals, the results for the supplementary variables and the results for the categorical variables.

Automatic description of axes

a tab containing the output of the dimdesc function. This function is designed to point out the variables and the categories that are the most characteristic according to each dimension obtained by a Factor Analysis.

Summary of dataset

a tab containing the summary of the dataset and a boxplot and histogram for quantitative variables.

Data

a tab containing the dataset with a nice display.

The left part of the application allows to change all the elements of the PCA and the graphs (axes,variables,colors...). The "Get your code" button print the PCA and the plots code in your RStudio session.

Arguments

X

a data frame with n rows (individuals) and p columns (numeric variables) or a PCAshiny result, or a PCA result

Author

Pauline Vaissie, Astrid Monge, Francois Husson paulinevaissie@gmail.com

See Also

PCA, plot.PCA
shiny website

Examples

Run this code
if (FALSE) {
require(FactoMineR)
data(decathlon)
# Principal Component Analysis with Factoshiny:
res.shiny=PCAshiny(decathlon)

# Find your app the way you left it (by clicking on the "Quit the app" button)
res.shiny2=PCAshiny(res.shiny)

#PCAshiny on a result of a PCA
res.pca <- PCA(decathlon, quanti.sup = 11:12, quali.sup=13)
res.shiny=PCAshiny(res.pca)
}

Run the code above in your browser using DataLab