Type: | Package |
Title: | Perform Factorial Analysis from 'FactoMineR' with a Shiny Application |
Version: | 2.7 |
Author: | Pauline Vaissie [aut],
Astrid Monge [aut],
Francois Husson |
Maintainer: | Francois Husson <francois.husson@institut-agro.fr> |
Depends: | R (≥ 4.0), FactoMineR (≥ 2.3),shiny,FactoInvestigate (≥ 1.5),ggplot2 |
Imports: | DT,colourpicker,grDevices,tcltk,ggrepel,shinydashboard,shinyjqui,missMDA |
Description: | Perform factorial analysis with a menu and draw graphs interactively thanks to 'FactoMineR' and a Shiny application. |
URL: | http://factominer.free.fr/graphs/factoshiny.html |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Encoding: | UTF-8 |
NeedsCompilation: | no |
Packaged: | 2025-01-15 16:26:22 UTC; husson |
Repository: | CRAN |
Date/Publication: | 2025-01-15 16:40:07 UTC |
Perform classical factorial analysis from FactoMineR within a Shiny app ~~ Factoshiny ~~
Description
Factoshiny allows to perform CA, PCA, MFA, HCPC and MFA (classical functions from FactoMineR) within a Shiny app. The user can easily change the function parameters and the graphs parameters and can automatically see the restults of the change on the plot. All graphs can be downloaded in png, jpg and pdf.
Details
Factoshiny has been created to be as easy to use as possible. Thus, only the dataset is needed to be informed in the main function.
Author(s)
Pauline Vaissie, Astrid Monge, Francois Husson
Maintainer: Who to complain to <francois.husson@institut-agro.fr>
References
A website: http://factominer.free.fr/graphs/factoshiny.html
Some videos: https://youtu.be/6y0NDDQcIXo
Correspondance Analysis (CA) with Factoshiny
Description
Performs Correspondance Analysis (CA) including supplementary row and/or column points on a Shiny application.
Columns or rows with NA are considered as supplementary in the analysis.
Allows to change CA parameters and graphical parmeters.
Graphics can be downloaded in png, jpg and pdf.
Usage
CAshiny(X)
Arguments
X |
a data frame or a table with n rows and p columns, i.e. a contingency table or a CAshiny result or a CA result |
Value
Returns several tabs:
Graphs |
a tab containing the row and column points factor map (with supplementary columns and supplementary rows) |
Values |
a tab containing the summary of the CA performed, the eigenvalues, the results for the columns, for the rows, for the supplementary columns and for the supplementary rows. |
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 CA and the graphs (axes,variables,colors...)
Author(s)
Pauline Vaissie, Astrid Monge, Francois Husson
See Also
CA
, plot.CA
shiny website,
Video showing how to perform CA with Factoshiny
Examples
## Not run:
require(FactoMineR)
data(children)
# Correspondance Analysis with Factoshiny:
res.shiny=CAshiny(children)
# Find your app the way you left it (by clicking on the "Quit the app" button)
res.shiny2=CAshiny(res.shiny)
#CAshiny on a result of a CA
data(children)
res.ca <- CA (children, row.sup = 15:18, col.sup = 6:8)
res.shiny=CAshiny(res.ca)
## End(Not run)
Factor Analysis for Mixed Data with Factoshiny
Description
Performs Factor Analysis for Mixed Data (FAMD) with supplementary individuals, supplementary quantitative variables and supplementary categorical variables on a Shiny application.
Allows to change FAMD parameters and graphical parmeters.
Graphics can be downloaded in png, jpg and pdf.
Usage
FAMDshiny(X)
Arguments
X |
a data frame with n rows (individuals) and p columns (numeric variables and categorical variables), or a FAMDshiny result or a FAMD result |
Value
Returns several tabs:
Graphs |
a tab containing the individuals factor map, the variables factor (quantitative and categorical) map and the correlation circle. |
Values |
a tab containing the summary of the FAMD performed, the eigenvalues, the results for the variables, the results for the individuals, the results for the supplementary variables and the results for the supplementary individuals. |
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 FAMDA and the graphs (axes,variables,colors...)
Author(s)
Pauline Vaissie, Astrid Monge, Francois Husson
See Also
Examples
## Not run:
require(FactoMineR)
data(geomorphology)
# FAMD with Factoshiny:
res.shiny=FAMDshiny(geomorphology)
# Find your app the way you left it (by clicking on the "Quit the app" button)
res.shiny2=FAMDshiny(res.shiny)
## End(Not run)
Choose the Factoshiny function to perform the analysis
Description
Choose betwwen all the available functions of the package
Usage
Factoshiny(X, language="auto")
Arguments
X |
a data frame with n rows (individuals) and p columns (numeric variables) or a Factoshiny result |
language |
string corresponding to the language you want for the interface. "french" or "english" are available; by default "auto" will automatically find the language of your computer |
Value
Open a web interface that allows you to choose the method you want to use on your dataset
Author(s)
Francois Husson
Examples
## Not run:
require(FactoMineR)
data(decathlon)
# Principal Component Analysis with Factoshiny:
res.shiny <- Factoshiny(decathlon)
# Find your app the way you left it (by clicking on the "Quit the app" button)
res.shiny2=Factoshiny(res.shiny)
#PCAshiny on a result of a PCA
res.pca <- PCA(decathlon, quanti.sup = 11:12, quali.sup=13)
res.shiny=Factoshiny(res.pca)
## End(Not run)
Hierarchical Clustering on Principal Components (HCPC) with Factoshiny
Description
Performs Hierarchical Clustering on Principal Components (HCPC) o results from a factor analysis on a Shiny application.
Allows to change HCPC parameters and graphical parmeters.
Graphics can be downloaded in png, jpg and pdf.
Usage
HCPCshiny(res)
Arguments
res |
Either the result of a factor analysis or a dataframe, the result of a HCPCshiny app or an HCPC result |
Value
Returns several tabs:
Graphs |
a tab containing the factor map,individuals colores by cluster, the 3D map (same graph but with tree above) and the tree map |
Values |
a tab containing the description of classes (by variables and by axes) and the parangons of each cluster |
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 the number of cluster very easily. Some parameters from the graphs can also be changed. By default, the numeric value of the number of clusters is set to the value advised by the HCPC function.
Author(s)
Pauline Vaissie, Astrid Monge, Francois Husson
See Also
HCPC
, plot.HCPC
shiny website,
Video showing how to perform clustering with Factoshiny
Examples
## Not run:
require(FactoMineR)
data(decathlon)
# HCPC with Factoshiny on a result of a factor analysis:
res.pca <- PCA(decathlon, quanti.sup = 11:12, quali.sup=13)
res.shiny=HCPCshiny(res.pca)
# HCPC with Factoshiny on a dataframe:
data(wine)
res.shiny2=HCPCshiny(wine)
# Find your app the way you left it (by clicking on the "Quit the app" button)
res.shiny3=HCPCshiny(res.shiny2)
## End(Not run)
Multiple Correspondence Analysis (MCA) with Factoshiny
Description
Performs Multiple Correspondence Analysis (MCA) with supplementary individuals, supplementary quantitative variables and supplementary categorical variables on a Shiny application.
Allows to change MCA parameters and graphical parmeters.
Graphics can be downloaded in png, jpg and pdf.
Usage
MCAshiny(X)
Arguments
X |
a data frame with n rows (individuals) and p columns (numeric variables), or a MCAshiny result or a MCA result |
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 MCA performed, the eigenvalues, the results for the variables, the results for the individuals, the results for the supplementary variables and the results for the numerical 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 MCA and the graphs (axes,variables,colors...)
Author(s)
Pauline Vaissie, Astrid Monge, Francois Husson
See Also
MCA
,dimdesc
,plot.MCA
shiny website,
Video showing how to perform MCA with Factoshiny
Examples
## Not run:
require(FactoMineR)
data(poison)
# Multiple Correspondance Analysis with Factoshiny:
res.shiny=MCAshiny(poison)
# Find your app the way you left it (by clicking on the "Quit the app" button)
res.shiny2=MCAshiny(res.shiny)
#MCAshiny on a result of a MCA
data(hobbies)
res.mca <- MCA(hobbies,quali.sup=19:22,quanti.sup=23)
res.shiny=MCAshiny(res.mca)
## End(Not run)
Multiple Factor Analysis (MFA) with Factoshiny
Description
Performs Multiple Factor Analysis (MFA) with supplementary individuals and supplementary groups of variables on a Shiny application.
Groups of variables can be quantitative, categorical or contingency tables.
Allows to change MFA parameters and graphical parmeters. A maximum of 10 groups can be created
Graphics can be downloaded in png, jpg, pdf and emf.
Usage
MFAshiny(X)
Arguments
X |
a data frame with n rows (individuals) and p columns or a result of the MFA function |
Value
Returns several tabs:
Graphs |
a tab containing the individuals factor map, the variables factor map, the groups factor map, the axes factor map and the frequencies factor map (if there is at least one frequency group) |
Values |
a tab containing the summary of the MFA performed, the eigenvalues, the results for the variables, the results for the individuals and the results of the groups |
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. |
Author(s)
Pauline Vaissie, Astrid Monge, Francois Husson
See Also
MFA
, plot.MFA
shiny website,
Video showing how to perform MFA with Factoshiny
Examples
## Not run:
require(FactoMineR)
data(wine)
# Multiple Factor Analysis with Factoshiny:
res.shiny=MFAshiny(wine)
#If you want to create your groups first and customize your graphs
res.mfa= MFA(wine, group=c(2,5,3,10,9,2), type=c("n",rep("s",5)),
ncp=5, name.group=c("orig","olf","vis","olfag","gust","ens"),
num.group.sup=c(1,6))
res.shiny=MFAshiny(res.mfa)
## End(Not run)
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)
Arguments
X |
a data frame with n rows (individuals) and p columns (numeric variables) or a PCAshiny result, or a PCA result |
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.
Author(s)
Pauline Vaissie, Astrid Monge, Francois Husson
See Also
PCA
, plot.PCA
shiny website,
Video showing how to perform PCA with Factoshiny
Examples
## Not run:
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)
## End(Not run)
Categories description
Description
Description of the categories of one factor by categorical variables and/or by quantitative variables
Usage
catdesshiny(X)
Arguments
X |
a data frame made up of at least one categorical variables and a set of quantitative variables and/or categorical variables |
Value
Returns a list including:
test.chi |
The categorical variables which characterized the factor are listed in ascending order (from the one which characterized the most
the factor to the one which significantly characterized with the proba |
category |
description of each category of the |
quanti.var |
the global description of the |
quanti |
the description of each category of the |
Author(s)
Etienne Lancelle, Francois Husson francois.husson@institut-agro.fr
References
Husson, F., Le, S. and Pages, J. (2010). Exploratory Multivariate Analysis by Example Using R, Chapman and Hall.
Lebart, L., Morineau, A. and Piron, M. (1995) Statistique exploratoire multidimensionnelle, Dunod.
See Also
Examples
## Not run:
require(FactoMineR)
data(wine)
catdesshiny(wine)
## End(Not run)
Continuous variable description
Description
Description continuous by quantitative variables and/or by categorical variables
Usage
condesshiny(X)
Arguments
X |
a data frame made up of at least one quantitative variable and a set of quantitative variables and/or categorical variables |
Value
Returns a list including:
quanti |
the description of the |
quali |
The categorical variables which characterized the continuous variables are listed in ascending order |
category |
description of the continuous variable |
Author(s)
Etienne Lancelle, Francois Husson francois.husson@institut-agro.fr
See Also
Examples
## Not run:
require(FactoMineR)
data(decathlon)
condesshiny(decathlon)
## End(Not run)
Print the CAshiny results
Description
Print the CAshiny results i.e the R corresponding script
Usage
## S3 method for class 'CAshiny'
print(x,...)
Arguments
x |
an object of class CAshiny |
... |
further arguments passed to or from other methods |
Author(s)
Pauline Vaissie, Astrid Monge, Francois Husson
See Also
Examples
## Not run:
data(children)
res.shiny = CAshiny(children)
#click on the "Quit the app" button
print(res.shiny)
## End(Not run)
Print the FAMDshiny results
Description
Print the FAMDshiny results i.e the R corresponding script
Usage
## S3 method for class 'FAMDshiny'
print(x,...)
Arguments
x |
an object of class FAMDshiny |
... |
further arguments passed to or from other methods |
Author(s)
Pauline Vaissie, Astrid Monge, Francois Husson
See Also
Examples
## Not run:
data(geomorphology)
res.shiny = FAMDshiny(geomorphology)
#click on the "Quit the app" button
print(res.shiny)
## End(Not run)
Print the HCPCshiny results
Description
Print the HCPCshiny results i.e the R corresponding script
Usage
## S3 method for class 'HCPCshiny'
print(x,...)
Arguments
x |
an object of class HCPCshiny |
... |
further arguments passed to or from other methods |
Author(s)
Pauline Vaissie, Astrid Monge, Francois Husson
See Also
Examples
## Not run:
data(decathlon)
res.shiny = HCPCshiny(decathlon)
#click on the "Quit the app" button
print(res.shiny)
## End(Not run)
Print the MCAshiny results
Description
Print the MCAshiny results i.e the R corresponding script
Usage
## S3 method for class 'MCAshiny'
print(x,...)
Arguments
x |
an object of class MCAshiny |
... |
further arguments passed to or from other methods |
Author(s)
Pauline Vaissie, Astrid Monge, Francois Husson
See Also
Examples
## Not run:
data(poison)
res.shiny = MCAshiny(poison)
#click on the "Quit the app" button
print(res.shiny)
## End(Not run)
Print the MFAshiny results
Description
Print the MFAshiny results i.e the R corresponding script
Usage
## S3 method for class 'MFAshiny'
print(x,...)
Arguments
x |
an object of class MFAshiny |
... |
further arguments passed to or from other methods |
Author(s)
Pauline Vaissie, Astrid Monge, Francois Husson
See Also
Examples
## Not run:
data(wine)
res<- MFA(wine, group=c(2,5,3,10,9,2), type=c("n",rep("s",5)),
ncp=5, name.group=c("orig","olf","vis","olfag","gust","ens"),
num.group.sup=c(1,6),graph=FALSE)
res.shiny=MFAshiny(res)
#click on the "Quit the app" button
print(res.shiny)
## End(Not run)
Print the PCAshiny results
Description
Print the PCAshiny results i.e the R corresponding script
Usage
## S3 method for class 'PCAshiny'
print(x,...)
Arguments
x |
an object of class PCAshiny |
... |
further arguments passed to or from other methods |
Author(s)
Pauline Vaissie, Astrid Monge, Francois Husson
See Also
Examples
## Not run:
data(decathlon)
res.shiny = PCAshiny(decathlon)
#click on the "Quit the app" button
print(res.shiny)
## End(Not run)