####################################################
######   Exploratory Techniques R Commands   #######
######       Correspondence Analysis         #######
####################################################

## Correspondence analysis helps identify associations in complex data

## The packages needed for these techniques are: 
## FactoMineR
## explor

## To install these packages enter
install.packages("FactoMineR")
install.packages("explor")

## R will ask you select a download server, choose one close to you.
## If for some reason this does not work, you can go to the menu and select install packages, just follow the steps

##########################################################
###  Multiple Correspondence Analysis in FactoMineR   ####
##########################################################

# load the packages
library(FactoMineR)
library(explor)

# load the data
df <- read.table(file.choose(), header=T, sep="\t")

# check the data
summary(df, stringsAsFactors = T)

# Perform Multiple Correspondence Analysis
MCAFac = MCA(df, graph= F)
explor(MCAFac)