R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(4 + ,'Yes' + ,'Treatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'Yes' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'Yes' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'Treatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'Yes' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'Yes' + ,'Treatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'UsedStats' + ,'No' + ,'Yes' + ,'Bad' + ,4 + ,'Yes' + ,'Treatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'UsedStats' + ,'No' + ,'Yes' + ,'Good' + ,4 + ,'No' + ,'Treatment' + ,NA + ,'UsedStats' + ,'No' + ,'Yes' + ,'Good' + ,4 + ,'Yes' + ,'Treatment' + ,NA + ,'UsedStats' + ,'Yes' + ,'Yes' + ,'Bad' + ,4 + ,'Yes' + ,'Treatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'Treatment' + ,NA + ,'UsedStats' + ,'Yes' + ,'Yes' + ,'Good' + ,4 + ,'Yes' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'Yes' + ,'Bad' + ,4 + ,'Yes' + ,'NoTreatment' + ,NA + ,'UsedStats' + ,'No' + ,'Yes' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'Yes' + ,'Good' + ,4 + ,'Yes' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'Yes' + ,'Good' + ,4 + ,'No' + ,'Treatment' + ,NA + ,'UsedStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'UsedStats' + ,'No' + ,'Yes' + ,'Bad' + ,4 + ,'Yes' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'UsedStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'Yes' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'Yes' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'Yes' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'Yes' + ,'Bad' + ,4 + ,'No' + ,'Treatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'Yes' + ,'Treatment' + ,NA + ,'UsedStats' + ,'No' + ,'Yes' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'UsedStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'Yes' + ,'Good' + ,4 + ,'No' + ,'Treatment' + ,NA + ,'NoStats' + ,'No' + ,'Yes' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'UsedStats' + ,'Yes' + ,'Yes' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'UsedStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'Yes' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'Yes' + ,'Good' + ,4 + ,'Yes' + ,'Treatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'Yes' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'Yes' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'Yes' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'Treatment' + ,NA + ,'UsedStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'Yes' + ,'Treatment' + ,NA + ,'UsedStats' + ,'Yes' + ,'Yes' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'UsedStats' + ,'Yes' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'Treatment' + ,NA + ,'UsedStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'UsedStats' + ,'No' + ,'Yes' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'Yes' + ,'Treatment' + ,NA + ,'UsedStats' + ,'Yes' + ,'Yes' + ,'Good' + ,4 + ,'Yes' + ,'Treatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'UsedStats' + ,'No' + ,'Yes' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'Yes' + ,'Treatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'Treatment' + ,NA + ,'UsedStats' + ,'Yes' + ,'Yes' + ,'Bad' + ,4 + ,'Yes' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'UsedStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'UsedStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'Yes' + ,'NoTreatment' + ,NA + ,'UsedStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'Treatment' + ,NA + ,'NoStats' + ,'No' + ,'Yes' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'UsedStats' + ,'No' + ,'Yes' + ,'Good' + ,4 + ,'No' + ,'Treatment' + ,NA + ,'UsedStats' + ,'Yes' + ,'No' + ,'Good' + ,4 + ,'No' + ,'Treatment' + ,NA + ,'NoStats' + ,'No' + ,'Yes' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'Yes' + ,'NoTreatment' + ,NA + ,'UsedStats' + ,'No' + ,'No' + ,'Good' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'UsedStats' + ,'Yes' + ,'No' + ,'Bad' + ,4 + ,'No' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'Yes' + ,'Good' + ,4 + ,'Yes' + ,'NoTreatment' + ,NA + ,'NoStats' + ,'No' + ,'No' + ,'Bad') + ,dim=c(8 + ,86) + ,dimnames=list(c('Weeks' + ,'UseLimit' + ,'T40' + ,'T20' + ,'Used' + ,'CorrectAnalysis' + ,'Useful' + ,'Outcome') + ,1:86)) > y <- array(NA,dim=c(8,86),dimnames=list(c('Weeks','UseLimit','T40','T20','Used','CorrectAnalysis','Useful','Outcome'),1:86)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } There were 50 or more warnings (use warnings() to see the first 50) > par3 = 'Pearson Chi-Squared' > par2 = '6' > par1 = '3' > main = 'Association Plot' > par3 <- 'Pearson Chi-Squared' > par2 <- '6' > par1 <- '3' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: > #Technical description: > library(vcd) Loading required package: MASS Loading required package: grid Loading required package: colorspace > cat1 <- as.numeric(par1) # > cat2<- as.numeric(par2) # > simulate.p.value=FALSE > if (par3 == 'Exact Pearson Chi-Squared by Simulation') simulate.p.value=TRUE > x <- t(x) > (z <- array(unlist(x),dim=c(length(x[,1]),length(x[1,])))) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] "4" "Yes" "Treatment" NA "NoStats" "No" "No" "Good" [2,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [3,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [4,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [5,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [6,] "4" "Yes" "NoTreatment" NA "NoStats" "No" "Yes" "Good" [7,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [8,] "4" "No" "Treatment" NA "NoStats" "No" "No" "Bad" [9,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Good" [10,] "4" "Yes" "NoTreatment" NA "NoStats" "No" "No" "Bad" [11,] "4" "Yes" "Treatment" NA "NoStats" "No" "No" "Bad" [12,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [13,] "4" "No" "NoTreatment" NA "UsedStats" "No" "Yes" "Bad" [14,] "4" "Yes" "Treatment" NA "NoStats" "No" "No" "Bad" [15,] "4" "No" "NoTreatment" NA "UsedStats" "No" "Yes" "Good" [16,] "4" "No" "Treatment" NA "UsedStats" "No" "Yes" "Good" [17,] "4" "Yes" "Treatment" NA "UsedStats" "Yes" "Yes" "Bad" [18,] "4" "Yes" "Treatment" NA "NoStats" "No" "No" "Bad" [19,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Good" [20,] "4" "No" "Treatment" NA "UsedStats" "Yes" "Yes" "Good" [21,] "4" "Yes" "NoTreatment" NA "NoStats" "No" "Yes" "Bad" [22,] "4" "Yes" "NoTreatment" NA "UsedStats" "No" "Yes" "Good" [23,] "4" "No" "NoTreatment" NA "NoStats" "No" "Yes" "Good" [24,] "4" "Yes" "NoTreatment" NA "NoStats" "No" "Yes" "Good" [25,] "4" "No" "Treatment" NA "UsedStats" "No" "No" "Good" [26,] "4" "No" "NoTreatment" NA "UsedStats" "No" "Yes" "Bad" [27,] "4" "Yes" "NoTreatment" NA "NoStats" "No" "No" "Good" [28,] "4" "No" "NoTreatment" NA "UsedStats" "No" "No" "Bad" [29,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Good" [30,] "4" "No" "NoTreatment" NA "NoStats" "No" "Yes" "Bad" [31,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [32,] "4" "Yes" "NoTreatment" NA "NoStats" "No" "No" "Bad" [33,] "4" "Yes" "NoTreatment" NA "NoStats" "No" "Yes" "Bad" [34,] "4" "No" "Treatment" NA "NoStats" "No" "No" "Good" [35,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [36,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [37,] "4" "Yes" "Treatment" NA "UsedStats" "No" "Yes" "Bad" [38,] "4" "No" "NoTreatment" NA "UsedStats" "No" "No" "Good" [39,] "4" "No" "NoTreatment" NA "NoStats" "No" "Yes" "Good" [40,] "4" "No" "Treatment" NA "NoStats" "No" "Yes" "Bad" [41,] "4" "No" "NoTreatment" NA "UsedStats" "Yes" "Yes" "Good" [42,] "4" "No" "NoTreatment" NA "UsedStats" "No" "No" "Good" [43,] "4" "Yes" "NoTreatment" NA "NoStats" "No" "Yes" "Good" [44,] "4" "Yes" "Treatment" NA "NoStats" "No" "No" "Bad" [45,] "4" "No" "NoTreatment" NA "NoStats" "No" "Yes" "Bad" [46,] "4" "No" "NoTreatment" NA "NoStats" "No" "Yes" "Good" [47,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [48,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Good" [49,] "4" "No" "NoTreatment" NA "NoStats" "No" "Yes" "Good" [50,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [51,] "4" "No" "Treatment" NA "UsedStats" "No" "No" "Bad" [52,] "4" "Yes" "Treatment" NA "UsedStats" "Yes" "Yes" "Bad" [53,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Good" [54,] "4" "No" "NoTreatment" NA "UsedStats" "Yes" "No" "Bad" [55,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [56,] "4" "No" "Treatment" NA "UsedStats" "No" "No" "Good" [57,] "4" "No" "NoTreatment" NA "UsedStats" "No" "Yes" "Good" [58,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Good" [59,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Good" [60,] "4" "Yes" "Treatment" NA "UsedStats" "Yes" "Yes" "Good" [61,] "4" "Yes" "Treatment" NA "NoStats" "No" "No" "Good" [62,] "4" "No" "NoTreatment" NA "UsedStats" "No" "Yes" "Bad" [63,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [64,] "4" "Yes" "Treatment" NA "NoStats" "No" "No" "Good" [65,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [66,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [67,] "4" "No" "Treatment" NA "UsedStats" "Yes" "Yes" "Bad" [68,] "4" "Yes" "NoTreatment" NA "NoStats" "No" "No" "Bad" [69,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Good" [70,] "4" "No" "NoTreatment" NA "UsedStats" "No" "No" "Bad" [71,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [72,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Good" [73,] "4" "No" "NoTreatment" NA "UsedStats" "No" "No" "Good" [74,] "4" "Yes" "NoTreatment" NA "UsedStats" "No" "No" "Bad" [75,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Good" [76,] "4" "No" "Treatment" NA "NoStats" "No" "Yes" "Good" [77,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Good" [78,] "4" "No" "NoTreatment" NA "UsedStats" "No" "Yes" "Good" [79,] "4" "No" "Treatment" NA "UsedStats" "Yes" "No" "Good" [80,] "4" "No" "Treatment" NA "NoStats" "No" "Yes" "Bad" [81,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [82,] "4" "Yes" "NoTreatment" NA "UsedStats" "No" "No" "Good" [83,] "4" "No" "NoTreatment" NA "NoStats" "No" "No" "Bad" [84,] "4" "No" "NoTreatment" NA "UsedStats" "Yes" "No" "Bad" [85,] "4" "No" "NoTreatment" NA "NoStats" "No" "Yes" "Good" [86,] "4" "Yes" "NoTreatment" NA "NoStats" "No" "No" "Bad" > (table1 <- table(z[,cat1],z[,cat2])) No Yes NoTreatment 60 3 Treatment 17 6 > (V1<-dimnames(y)[[1]][cat1]) [1] "T40" > (V2<-dimnames(y)[[1]][cat2]) [1] "CorrectAnalysis" > postscript(file="/var/fisher/rcomp/tmp/1su091355477068.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > assoc(ftable(z[,cat1],z[,cat2],row.vars=1,dnn=c(V1,V2)),shade=T) > dev.off() null device 1 > > #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Tabulation of Results',ncol(table1)+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,paste(V1,' x ', V2),ncol(table1)+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, ' ', 1,TRUE) > for(nc in 1:ncol(table1)){ + a<-table.element(a, colnames(table1)[nc], 1, TRUE) + } > a<-table.row.end(a) > for(nr in 1:nrow(table1) ){ + a<-table.element(a, rownames(table1)[nr], 1, TRUE) + for(nc in 1:ncol(table1) ){ + a<-table.element(a, table1[nr, nc], 1, FALSE) + } + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/2ndwq1355477068.tab") > (cst<-chisq.test(table1, simulate.p.value=simulate.p.value) ) Pearson's Chi-squared test with Yates' continuity correction data: table1 X-squared = 6.0598, df = 1, p-value = 0.01383 Warning message: In chisq.test(table1, simulate.p.value = simulate.p.value) : Chi-squared approximation may be incorrect > if (par3 == 'McNemar Chi-Squared') { + (cst <- mcnemar.test(table1)) + } > if (par3=='Fisher Exact Test') { + (cst <- fisher.test(table1)) + } > if ((par3 != 'McNemar Chi-Squared') & (par3 != 'Fisher Exact Test')) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Tabulation of Expected Results',ncol(table1)+1,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,paste(V1,' x ', V2),ncol(table1)+1,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a, ' ', 1,TRUE) + for(nc in 1:ncol(table1)){ + a<-table.element(a, colnames(table1)[nc], 1, TRUE) + } + a<-table.row.end(a) + for(nr in 1:nrow(table1) ){ + a<-table.element(a, rownames(table1)[nr], 1, TRUE) + for(nc in 1:ncol(table1) ){ + a<-table.element(a, round(cst$expected[nr, nc], digits=2), 1, FALSE) + } + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/fisher/rcomp/tmp/34n4x1355477068.tab") + } > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Statistical Results',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, cst$method, 2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > if (par3=='Pearson Chi-Squared') a<-table.element(a, 'Pearson Chi Square Statistic', 1, TRUE) > if (par3=='Exact Pearson Chi-Squared by Simulation') a<-table.element(a, 'Exact Pearson Chi Square Statistic', 1, TRUE) > if (par3=='McNemar Chi-Squared') a<-table.element(a, 'McNemar Chi Square Statistic', 1, TRUE) > if (par3=='Fisher Exact Test') a<-table.element(a, 'Odds Ratio', 1, TRUE) > if (par3=='Fisher Exact Test') { + if ((ncol(table1) == 2) & (nrow(table1) == 2)) { + a<-table.element(a, round(cst$estimate, digits=2), 1,FALSE) + } else { + a<-table.element(a, '--', 1,FALSE) + } + } else { + a<-table.element(a, round(cst$statistic, digits=2), 1,FALSE) + } > a<-table.row.end(a) > if(!simulate.p.value){ + if(par3!='Fisher Exact Test') { + a<-table.row.start(a) + a<-table.element(a, 'Degrees of Freedom', 1, TRUE) + a<-table.element(a, cst$parameter, 1,FALSE) + a<-table.row.end(a) + } + } > a<-table.row.start(a) > a<-table.element(a, 'P value', 1, TRUE) > a<-table.element(a, round(cst$p.value, digits=2), 1,FALSE) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/48uv21355477068.tab") > > try(system("convert tmp/1su091355477068.ps tmp/1su091355477068.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 1.653 0.305 1.942