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(41 + ,38 + ,13 + ,12 + ,14 + ,12 + ,39 + ,32 + ,16 + ,11 + ,18 + ,11 + ,30 + ,35 + ,19 + ,15 + ,11 + ,14 + ,31 + ,33 + ,15 + ,6 + ,12 + ,12 + ,34 + ,37 + ,14 + ,13 + ,16 + ,21 + ,35 + ,29 + ,13 + ,10 + ,18 + ,12 + ,39 + ,31 + ,19 + ,12 + ,14 + ,22 + ,34 + ,36 + ,15 + ,14 + ,14 + ,11 + ,36 + ,35 + ,14 + ,12 + ,15 + ,10 + ,37 + ,38 + ,15 + ,6 + ,15 + ,13 + ,38 + ,31 + ,16 + ,10 + ,17 + ,10 + ,36 + ,34 + ,16 + ,12 + ,19 + ,8 + ,38 + ,35 + ,16 + ,12 + ,10 + ,15 + ,39 + ,38 + ,16 + ,11 + ,16 + ,14 + ,33 + ,37 + ,17 + ,15 + ,18 + ,10 + ,32 + ,33 + ,15 + ,12 + ,14 + ,14 + ,36 + ,32 + ,15 + ,10 + ,14 + ,14 + ,38 + ,38 + ,20 + ,12 + ,17 + ,11 + ,39 + ,38 + ,18 + ,11 + ,14 + ,10 + ,32 + ,32 + ,16 + ,12 + ,16 + ,13 + ,32 + ,33 + ,16 + ,11 + ,18 + ,7 + ,31 + ,31 + ,16 + ,12 + ,11 + ,14 + ,39 + ,38 + ,19 + ,13 + ,14 + ,12 + ,37 + ,39 + ,16 + ,11 + ,12 + ,14 + ,39 + ,32 + ,17 + ,9 + ,17 + ,11 + ,41 + ,32 + ,17 + ,13 + ,9 + ,9 + ,36 + ,35 + ,16 + ,10 + ,16 + ,11 + ,33 + ,37 + ,15 + ,14 + ,14 + ,15 + ,33 + ,33 + ,16 + ,12 + ,15 + ,14 + ,34 + ,33 + ,14 + ,10 + ,11 + ,13 + ,31 + ,28 + ,15 + ,12 + ,16 + ,9 + ,27 + ,32 + ,12 + ,8 + ,13 + ,15 + ,37 + ,31 + ,14 + ,10 + ,17 + ,10 + ,34 + ,37 + ,16 + ,12 + ,15 + ,11 + ,34 + ,30 + ,14 + ,12 + ,14 + ,13 + ,32 + ,33 + ,7 + ,7 + ,16 + ,8 + ,29 + ,31 + ,10 + ,6 + ,9 + ,20 + ,36 + ,33 + ,14 + ,12 + ,15 + ,12 + ,29 + ,31 + ,16 + ,10 + ,17 + ,10 + ,35 + ,33 + ,16 + ,10 + ,13 + ,10 + ,37 + ,32 + ,16 + ,10 + ,15 + ,9 + ,34 + ,33 + ,14 + ,12 + ,16 + ,14 + ,38 + ,32 + ,20 + ,15 + ,16 + ,8 + ,35 + ,33 + ,14 + ,10 + ,12 + ,14 + ,38 + ,28 + ,14 + ,10 + ,12 + ,11 + ,37 + ,35 + ,11 + ,12 + ,11 + ,13 + ,38 + ,39 + ,14 + ,13 + ,15 + ,9 + ,33 + ,34 + ,15 + ,11 + ,15 + ,11 + ,36 + ,38 + ,16 + ,11 + ,17 + ,15 + ,38 + ,32 + ,14 + ,12 + ,13 + ,11 + ,32 + ,38 + ,16 + ,14 + ,16 + ,10 + ,32 + ,30 + ,14 + ,10 + ,14 + ,14 + ,32 + ,33 + ,12 + ,12 + ,11 + ,18 + ,34 + ,38 + ,16 + ,13 + ,12 + ,14 + ,32 + ,32 + ,9 + ,5 + ,12 + ,11 + ,37 + ,32 + ,14 + ,6 + ,15 + ,12 + ,39 + ,34 + ,16 + ,12 + ,16 + ,13 + ,29 + ,34 + ,16 + ,12 + ,15 + ,9 + ,37 + ,36 + ,15 + ,11 + ,12 + ,10 + ,35 + ,34 + ,16 + ,10 + ,12 + ,15 + ,30 + ,28 + ,12 + ,7 + ,8 + ,20 + ,38 + ,34 + ,16 + ,12 + ,13 + ,12 + ,34 + ,35 + ,16 + ,14 + ,11 + ,12 + ,31 + ,35 + ,14 + ,11 + ,14 + ,14 + ,34 + ,31 + ,16 + ,12 + ,15 + ,13 + ,35 + ,37 + ,17 + ,13 + ,10 + ,11 + ,36 + ,35 + ,18 + ,14 + ,11 + ,17 + ,30 + ,27 + ,18 + ,11 + ,12 + ,12 + ,39 + ,40 + ,12 + ,12 + ,15 + ,13 + ,35 + ,37 + ,16 + ,12 + ,15 + ,14 + ,38 + ,36 + ,10 + ,8 + ,14 + ,13 + ,31 + ,38 + ,14 + ,11 + ,16 + ,15 + ,34 + ,39 + ,18 + ,14 + ,15 + ,13 + ,38 + ,41 + ,18 + ,14 + ,15 + ,10 + ,34 + ,27 + ,16 + ,12 + ,13 + ,11 + ,39 + ,30 + ,17 + ,9 + ,12 + ,19 + ,37 + ,37 + ,16 + ,13 + ,17 + ,13 + ,34 + ,31 + ,16 + ,11 + ,13 + ,17 + ,28 + ,31 + ,13 + ,12 + ,15 + ,13 + ,37 + ,27 + ,16 + ,12 + ,13 + ,9 + ,33 + ,36 + ,16 + ,12 + ,15 + ,11 + ,37 + ,38 + ,20 + ,12 + ,16 + ,10 + ,35 + ,37 + ,16 + ,12 + ,15 + ,9 + ,37 + ,33 + ,15 + ,12 + ,16 + ,12 + ,32 + ,34 + ,15 + ,11 + ,15 + ,12 + ,33 + ,31 + ,16 + ,10 + ,14 + ,13 + ,38 + ,39 + ,14 + ,9 + ,15 + ,13 + ,33 + ,34 + ,16 + ,12 + ,14 + ,12 + ,29 + ,32 + ,16 + ,12 + ,13 + ,15 + ,33 + ,33 + ,15 + ,12 + ,7 + ,22 + ,31 + ,36 + ,12 + ,9 + ,17 + ,13 + ,36 + ,32 + ,17 + ,15 + ,13 + ,15 + ,35 + ,41 + ,16 + ,12 + ,15 + ,13 + ,32 + ,28 + ,15 + ,12 + ,14 + ,15 + ,29 + ,30 + ,13 + ,12 + ,13 + ,10 + ,39 + ,36 + ,16 + ,10 + ,16 + ,11 + ,37 + ,35 + ,16 + ,13 + ,12 + ,16 + ,35 + ,31 + ,16 + ,9 + ,14 + ,11 + ,37 + ,34 + ,16 + ,12 + ,17 + ,11 + ,32 + ,36 + ,14 + ,10 + ,15 + ,10 + ,38 + ,36 + ,16 + ,14 + ,17 + ,10 + ,37 + ,35 + ,16 + ,11 + ,12 + ,16 + ,36 + ,37 + ,20 + ,15 + ,16 + ,12 + ,32 + ,28 + ,15 + ,11 + ,11 + ,11 + ,33 + ,39 + ,16 + ,11 + ,15 + ,16 + ,40 + ,32 + ,13 + ,12 + ,9 + ,19 + ,38 + ,35 + ,17 + ,12 + ,16 + ,11 + ,41 + ,39 + ,16 + ,12 + ,15 + ,16 + ,36 + ,35 + ,16 + ,11 + ,10 + ,15 + ,43 + ,42 + ,12 + ,7 + ,10 + ,24 + ,30 + ,34 + ,16 + ,12 + ,15 + ,14 + ,31 + ,33 + ,16 + ,14 + ,11 + ,15 + ,32 + ,41 + ,17 + ,11 + ,13 + ,11 + ,32 + ,33 + ,13 + ,11 + ,14 + ,15 + ,37 + ,34 + ,12 + ,10 + ,18 + ,12 + ,37 + ,32 + ,18 + ,13 + ,16 + ,10 + ,33 + ,40 + ,14 + ,13 + ,14 + ,14 + ,34 + ,40 + ,14 + ,8 + ,14 + ,13 + ,33 + ,35 + ,13 + ,11 + ,14 + ,9 + ,38 + ,36 + ,16 + ,12 + ,14 + ,15 + ,33 + ,37 + ,13 + ,11 + ,12 + ,15 + ,31 + ,27 + ,16 + ,13 + ,14 + ,14 + ,38 + ,39 + ,13 + ,12 + ,15 + ,11 + ,37 + ,38 + ,16 + ,14 + ,15 + ,8 + ,33 + ,31 + ,15 + ,13 + ,15 + ,11 + ,31 + ,33 + ,16 + ,15 + ,13 + ,11 + ,39 + ,32 + ,15 + ,10 + ,17 + ,8 + ,44 + ,39 + ,17 + ,11 + ,17 + ,10 + ,33 + ,36 + ,15 + ,9 + ,19 + ,11 + ,35 + ,33 + ,12 + ,11 + ,15 + ,13 + ,32 + ,33 + ,16 + ,10 + ,13 + ,11 + ,28 + ,32 + ,10 + ,11 + ,9 + ,20 + ,40 + ,37 + ,16 + ,8 + ,15 + ,10 + ,27 + ,30 + ,12 + ,11 + ,15 + ,15 + ,37 + ,38 + ,14 + ,12 + ,15 + ,12 + ,32 + ,29 + ,15 + ,12 + ,16 + ,14 + ,28 + ,22 + ,13 + ,9 + ,11 + ,23 + ,34 + ,35 + ,15 + ,11 + ,14 + ,14 + ,30 + ,35 + ,11 + ,10 + ,11 + ,16 + ,35 + ,34 + ,12 + ,8 + ,15 + ,11 + ,31 + ,35 + ,8 + ,9 + ,13 + ,12 + ,32 + ,34 + ,16 + ,8 + ,15 + ,10 + ,30 + ,34 + ,15 + ,9 + ,16 + ,14 + ,30 + ,35 + ,17 + ,15 + ,14 + ,12 + ,31 + ,23 + ,16 + ,11 + ,15 + ,12 + ,40 + ,31 + ,10 + ,8 + ,16 + ,11 + ,32 + ,27 + ,18 + ,13 + ,16 + ,12 + ,36 + ,36 + ,13 + ,12 + ,11 + ,13 + ,32 + ,31 + ,16 + ,12 + ,12 + ,11 + ,35 + ,32 + ,13 + ,9 + ,9 + ,19 + ,38 + ,39 + ,10 + ,7 + ,16 + ,12 + ,42 + ,37 + ,15 + ,13 + ,13 + ,17 + ,34 + ,38 + ,16 + ,9 + ,16 + ,9 + ,35 + ,39 + ,16 + ,6 + ,12 + ,12 + ,35 + ,34 + ,14 + ,8 + ,9 + ,19 + ,33 + ,31 + ,10 + ,8 + ,13 + ,18 + ,36 + ,32 + ,17 + ,15 + ,13 + ,15 + ,32 + ,37 + ,13 + ,6 + ,14 + ,14 + ,33 + ,36 + ,15 + ,9 + ,19 + ,11 + ,34 + ,32 + ,16 + ,11 + ,13 + ,9 + ,32 + ,35 + ,12 + ,8 + ,12 + ,18) + ,dim=c(6 + ,161) + ,dimnames=list(c('Connected' + ,'Separate' + ,'Learning' + ,'Software' + ,'Happiness' + ,'Depression') + ,1:161)) > y <- array(NA,dim=c(6,161),dimnames=list(c('Connected','Separate','Learning','Software','Happiness','Depression'),1:161)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'Pearson Chi-Squared' > par2 = '5' > par1 = '4' > main = 'Association Plot' > par3 <- 'Pearson Chi-Squared' > par2 <- '5' > par1 <- '4' > #'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] [1,] 41 38 13 12 14 12 [2,] 39 32 16 11 18 11 [3,] 30 35 19 15 11 14 [4,] 31 33 15 6 12 12 [5,] 34 37 14 13 16 21 [6,] 35 29 13 10 18 12 [7,] 39 31 19 12 14 22 [8,] 34 36 15 14 14 11 [9,] 36 35 14 12 15 10 [10,] 37 38 15 6 15 13 [11,] 38 31 16 10 17 10 [12,] 36 34 16 12 19 8 [13,] 38 35 16 12 10 15 [14,] 39 38 16 11 16 14 [15,] 33 37 17 15 18 10 [16,] 32 33 15 12 14 14 [17,] 36 32 15 10 14 14 [18,] 38 38 20 12 17 11 [19,] 39 38 18 11 14 10 [20,] 32 32 16 12 16 13 [21,] 32 33 16 11 18 7 [22,] 31 31 16 12 11 14 [23,] 39 38 19 13 14 12 [24,] 37 39 16 11 12 14 [25,] 39 32 17 9 17 11 [26,] 41 32 17 13 9 9 [27,] 36 35 16 10 16 11 [28,] 33 37 15 14 14 15 [29,] 33 33 16 12 15 14 [30,] 34 33 14 10 11 13 [31,] 31 28 15 12 16 9 [32,] 27 32 12 8 13 15 [33,] 37 31 14 10 17 10 [34,] 34 37 16 12 15 11 [35,] 34 30 14 12 14 13 [36,] 32 33 7 7 16 8 [37,] 29 31 10 6 9 20 [38,] 36 33 14 12 15 12 [39,] 29 31 16 10 17 10 [40,] 35 33 16 10 13 10 [41,] 37 32 16 10 15 9 [42,] 34 33 14 12 16 14 [43,] 38 32 20 15 16 8 [44,] 35 33 14 10 12 14 [45,] 38 28 14 10 12 11 [46,] 37 35 11 12 11 13 [47,] 38 39 14 13 15 9 [48,] 33 34 15 11 15 11 [49,] 36 38 16 11 17 15 [50,] 38 32 14 12 13 11 [51,] 32 38 16 14 16 10 [52,] 32 30 14 10 14 14 [53,] 32 33 12 12 11 18 [54,] 34 38 16 13 12 14 [55,] 32 32 9 5 12 11 [56,] 37 32 14 6 15 12 [57,] 39 34 16 12 16 13 [58,] 29 34 16 12 15 9 [59,] 37 36 15 11 12 10 [60,] 35 34 16 10 12 15 [61,] 30 28 12 7 8 20 [62,] 38 34 16 12 13 12 [63,] 34 35 16 14 11 12 [64,] 31 35 14 11 14 14 [65,] 34 31 16 12 15 13 [66,] 35 37 17 13 10 11 [67,] 36 35 18 14 11 17 [68,] 30 27 18 11 12 12 [69,] 39 40 12 12 15 13 [70,] 35 37 16 12 15 14 [71,] 38 36 10 8 14 13 [72,] 31 38 14 11 16 15 [73,] 34 39 18 14 15 13 [74,] 38 41 18 14 15 10 [75,] 34 27 16 12 13 11 [76,] 39 30 17 9 12 19 [77,] 37 37 16 13 17 13 [78,] 34 31 16 11 13 17 [79,] 28 31 13 12 15 13 [80,] 37 27 16 12 13 9 [81,] 33 36 16 12 15 11 [82,] 37 38 20 12 16 10 [83,] 35 37 16 12 15 9 [84,] 37 33 15 12 16 12 [85,] 32 34 15 11 15 12 [86,] 33 31 16 10 14 13 [87,] 38 39 14 9 15 13 [88,] 33 34 16 12 14 12 [89,] 29 32 16 12 13 15 [90,] 33 33 15 12 7 22 [91,] 31 36 12 9 17 13 [92,] 36 32 17 15 13 15 [93,] 35 41 16 12 15 13 [94,] 32 28 15 12 14 15 [95,] 29 30 13 12 13 10 [96,] 39 36 16 10 16 11 [97,] 37 35 16 13 12 16 [98,] 35 31 16 9 14 11 [99,] 37 34 16 12 17 11 [100,] 32 36 14 10 15 10 [101,] 38 36 16 14 17 10 [102,] 37 35 16 11 12 16 [103,] 36 37 20 15 16 12 [104,] 32 28 15 11 11 11 [105,] 33 39 16 11 15 16 [106,] 40 32 13 12 9 19 [107,] 38 35 17 12 16 11 [108,] 41 39 16 12 15 16 [109,] 36 35 16 11 10 15 [110,] 43 42 12 7 10 24 [111,] 30 34 16 12 15 14 [112,] 31 33 16 14 11 15 [113,] 32 41 17 11 13 11 [114,] 32 33 13 11 14 15 [115,] 37 34 12 10 18 12 [116,] 37 32 18 13 16 10 [117,] 33 40 14 13 14 14 [118,] 34 40 14 8 14 13 [119,] 33 35 13 11 14 9 [120,] 38 36 16 12 14 15 [121,] 33 37 13 11 12 15 [122,] 31 27 16 13 14 14 [123,] 38 39 13 12 15 11 [124,] 37 38 16 14 15 8 [125,] 33 31 15 13 15 11 [126,] 31 33 16 15 13 11 [127,] 39 32 15 10 17 8 [128,] 44 39 17 11 17 10 [129,] 33 36 15 9 19 11 [130,] 35 33 12 11 15 13 [131,] 32 33 16 10 13 11 [132,] 28 32 10 11 9 20 [133,] 40 37 16 8 15 10 [134,] 27 30 12 11 15 15 [135,] 37 38 14 12 15 12 [136,] 32 29 15 12 16 14 [137,] 28 22 13 9 11 23 [138,] 34 35 15 11 14 14 [139,] 30 35 11 10 11 16 [140,] 35 34 12 8 15 11 [141,] 31 35 8 9 13 12 [142,] 32 34 16 8 15 10 [143,] 30 34 15 9 16 14 [144,] 30 35 17 15 14 12 [145,] 31 23 16 11 15 12 [146,] 40 31 10 8 16 11 [147,] 32 27 18 13 16 12 [148,] 36 36 13 12 11 13 [149,] 32 31 16 12 12 11 [150,] 35 32 13 9 9 19 [151,] 38 39 10 7 16 12 [152,] 42 37 15 13 13 17 [153,] 34 38 16 9 16 9 [154,] 35 39 16 6 12 12 [155,] 35 34 14 8 9 19 [156,] 33 31 10 8 13 18 [157,] 36 32 17 15 13 15 [158,] 32 37 13 6 14 14 [159,] 33 36 15 9 19 11 [160,] 34 32 16 11 13 9 [161,] 32 35 12 8 12 18 > (table1 <- table(z[,cat1],z[,cat2])) 7 8 9 10 11 12 13 14 15 16 17 18 19 5 0 0 0 0 0 1 0 0 0 0 0 0 0 6 0 0 1 0 0 2 0 1 2 0 0 0 0 7 0 1 0 1 0 0 0 0 0 2 0 0 0 8 0 0 1 0 0 1 2 2 3 1 0 0 0 9 0 0 1 0 1 1 1 1 1 2 2 0 2 10 0 0 0 0 2 3 2 3 2 2 4 2 0 11 0 0 1 1 1 5 3 5 6 2 2 2 0 12 1 0 1 1 4 1 6 7 16 8 2 0 1 13 0 0 1 1 0 2 1 3 2 3 1 0 0 14 0 0 0 0 3 0 0 2 3 1 1 0 0 15 0 0 0 0 1 0 3 1 0 2 0 1 0 > (V1<-dimnames(y)[[1]][cat1]) [1] "Software" > (V2<-dimnames(y)[[1]][cat2]) [1] "Happiness" > postscript(file="/var/wessaorg/rcomp/tmp/1valg1352541140.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/2gp1u1352541140.tab") > (cst<-chisq.test(table1, simulate.p.value=simulate.p.value) ) Pearson's Chi-squared test data: table1 X-squared = 151.1777, df = 120, p-value = 0.02853 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/wessaorg/rcomp/tmp/3ikcv1352541140.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/wessaorg/rcomp/tmp/4vpz21352541140.tab") > > try(system("convert tmp/1valg1352541140.ps tmp/1valg1352541140.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.296 0.339 3.611