FactoMineR and Excel

The use of R through Excel is possible thanks to RExcel.

Installing RExcel

You can use two different ways to install RExcel:

  • Download RAndFriendsSetup2110V3.1-1-1.exe.
    Make sure R or Excel are not running then launch RAndFriendsSetup2110V3.1-1-1.exe.
    Follow the instructions to install R 2.11.1, statconnDCOM, RExcel and RAndExcelWorkbooks
  • If you already have R 2.11.1, open it and type the following code in the R GUI:
    install.packages("RExcelInstaller")
    library(RExcelInstaller)
    installRExcel()
    Then type:
    library(rcom)
    installstatconnDCOM()

Once everything has been installed, a new icon appears in your desktop (here for Excel 2007):
RExcel
This icon integrates RExcel with the Rcmdr menu in Excel.

Open RExcel, R is opened automatically at the same time.
A new tab "Complements" (or "RExcel" depending on the Microsoft Office version) has been added. It provides the Rcmdr menu you can now easily use.

Installing RExcel Click to view

Once you have installed RExcel, two different ways to use FactoMineR are possible:

FactoMineR’s Rcmdr Graphical User Interface via Excel menus

Three different cases exist:

  1. You had already installed FactoMineR's graphical user interface in your Rcmdr menu before installing RExcel and it has been imported to RExcel with the other Rcmdr menus: you do not have to do anything more.

  2. You had not already installed FactoMineR's graphical user interface and want to install it via R.
    Open R and download FactoMineR's package and Rcmdr menu by typing in the R GUI:
    source("http://factominer.free.fr/install-facto.r") Then open RExcel; FactoMineR's menu is available.

  3. You had not already installed FactoMineR's graphical user interface and want to install it via RExcel.
    In the Excel's Rcmdr menu, choose "Tools" then "Load Rcmdr plug-in(s)..." and choose " Rcmdrplugin.FactoMineR":
    Installing FactoMineR's Rcmdr plug-in in Excel Click to view Installing FactoMineR's Rcmdr plug-in in Excel

FactoMineR's menu is now available:

FactoMineR's plug-in Click to view

FactoMineR Excel macro (for Excel 2007)

Download the FactoMineR Excel macro and open it (do not forget to enable macros).

A tab "FactoMineR" is available. A data set is already here as an example of the kind of dataset to use. Delete it and paste your own dataset instead.

FactoMineR's macroClick to view

"Import data" is the only enabled button. Click to send your data set to R.

Sending data for Excel to R Click to view Sending data for Excel to R

The first column to select corresponds to individuals when performing PCA or MCA or rows when performing CA.
The second one corresponds to continuous variables when performing PCA or MCA or columns when performing CA.
The third one corresponds to categorical variables when performing PCA or MCA.

You do not have to fill all the cases. You can not have individuals and you can have only categorical or only continuous variables.

Once data are imported, other buttons are enabled and you are free to perform the analysis you need.

Sending data for Excel to R Click to view