[R] Multi Correspondence Analysis

arun smartpink111 at yahoo.com
Fri Aug 16 21:55:32 CEST 2013


Hi,

You can upload the dataset using:
library(XLConnect)
 wb<-loadWorkbook("excel_data.xlsx")
 dat1<- readWorksheet(wb,sheet="excel data",region="A1:DA101") #region can be specified to read a subset of the dataset.  Here, I read the full #dataset.

dim(dat1)
#[1] 100 105
str(dat1)
#'data.frame':    100 obs. of  105 variables:
# $ cid     : num  17226 26226 32226 47226 48226 ...
# $ q14a_1  : chr  "6" "5" "6" "6" ...
# $ q14a_2  : chr  "6" "7" "6" "5" ...
# $ q14a_3  : chr  "6" "6" "6" "5" ...
--------------------------------------------


There are a lot of missing values.  


Other option would be to save the file .csv and call by read.csv().  In that case, only the active sheet will be saved.

#For example: after saving the file as "excel_data.csv"

dat2<- read.csv("excel_data.csv",header=TRUE,stringsAsFactors=FALSE)

 dim(dat2)
#[1] 100 105


Regarding the multi correspondence analysis, the link below may help you.
http://gastonsanchez.wordpress.com/2012/10/13/5-functions-to-do-multiple-correspondence-analysis-in-r/

A.K.





Hi everyone, 

I am new with R and I need some help. 

I have the following data 

excel_data.xlsx

And I would like to upload it in R and run a multi correspondence analysis. 

Any help will be really appreciate it. 

Thanks in advance, 

mils



More information about the R-help mailing list