library(FactoMineR) library(ggplot2) library(grid) library(ggrepel) soundGroups=read.csv("allMaster.csv", header = TRUE, row.names = 1, sep = ",") res.ca = CA(soundGroups) chisq<-chisq.test(soundGroups) 1/(nrow(soundGroups)-1) 1/(ncol(soundGroups)-1) #If the data were random, the expected value of the eigenvalue for each axis would be 1/(nrow(housetasks)-1) in terms of rows. #Likewise, the average axis should account for 1/(ncol(soundGroups)-1) in terms of the columns. #Any axis with a contribution larger than the maximum of these two percentages should be considered as important and included in the solution for the interpretation of the data (see, Bendixen 1995, 577). #=11 dimensions res.ca = CA(soundGroups, ncp=11) eigen<-res.ca$eig write.csv(eigen, file="eigen.csv", row.names=TRUE) #---- res.hcpc<-HCPC(res.ca, cluster.CA="rows", consol=FALSE) res.hcpc$desc.var setEPS() postscript("soundscape.eps", family="Times", width=7, height=7) plot(res.hcpc, axes=c(1,2), choice="tree", rect=FALSE, tree.barplot=FALSE, centers.plot=FALSE, cex=0.8) dev.off() #-----