Rev 891 | Rev 911 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#匯入gmodels套件library(gmodels)#產生資料標題dnnStr=c("性別","學歷")vectorPart=c("M","M","M","M","M","M","M","F","F","F")var1=vectorPartvectorPart=c("M","M","M","M","M","M","M","F","F","F")var1=c(var1,vectorPart)vectorPart=c("M","M","M","M","M","M","M","F","F","F")var1=c(var1,vectorPart)vectorPart=c("M","M","M","M","M","M","M","F","F","F")var1=c(var1,vectorPart)vectorPart=c("大學","大學","研究所","研究所","研究所","高中","高中","高中","高中","大學")var2=vectorPartvectorPart=c("大學","大學","研究所","研究所","研究所","高中","高中","高中","高中","大學")var2=c(var2,vectorPart)vectorPart=c("大學","大學","研究所","研究所","研究所","高中","高中","高中","高中","大學")var2=c(var2,vectorPart)vectorPart=c("大學","大學","研究所","研究所","研究所","高中","高中","高中","高中","大學")var2=c(var2,vectorPart)#交叉分析CrossTable(var1,var2,dnn=dnnStr,prop.t=FALSE,prop.c=FALSE,prop.chisq=FALSE,chisq=TRUE,fisher=FALSE)