R version 2.8.0 (2008-10-20) Copyright (C) 2008 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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. Natural language support but running in an English locale 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(13 + ,5 + ,14 + ,12 + ,3 + ,18 + ,15 + ,0 + ,11 + ,12 + ,7 + ,12 + ,10 + ,4 + ,16 + ,12 + ,1 + ,18 + ,15 + ,6 + ,14 + ,9 + ,3 + ,14 + ,12 + ,12 + ,15 + ,11 + ,0 + ,15 + ,11 + ,5 + ,17 + ,11 + ,6 + ,19 + ,15 + ,6 + ,10 + ,7 + ,6 + ,16 + ,11 + ,2 + ,18 + ,11 + ,1 + ,14 + ,10 + ,5 + ,14 + ,14 + ,7 + ,17 + ,10 + ,3 + ,14 + ,6 + ,3 + ,16 + ,11 + ,3 + ,18 + ,15 + ,7 + ,11 + ,11 + ,8 + ,14 + ,12 + ,6 + ,12 + ,14 + ,3 + ,17 + ,15 + ,5 + ,9 + ,9 + ,5 + ,16 + ,13 + ,10 + ,14 + ,13 + ,2 + ,15 + ,16 + ,6 + ,11 + ,13 + ,4 + ,16 + ,12 + ,6 + ,13 + ,14 + ,8 + ,17 + ,11 + ,4 + ,15 + ,9 + ,5 + ,14 + ,16 + ,10 + ,16 + ,12 + ,6 + ,9 + ,10 + ,7 + ,15 + ,13 + ,4 + ,17 + ,16 + ,10 + ,13 + ,14 + ,4 + ,15 + ,15 + ,3 + ,16 + ,5 + ,3 + ,16 + ,8 + ,3 + ,12 + ,11 + ,3 + ,12 + ,16 + ,7 + ,11 + ,17 + ,15 + ,15 + ,9 + ,0 + ,15 + ,9 + ,0 + ,17 + ,13 + ,4 + ,13 + ,10 + ,5 + ,16 + ,6 + ,5 + ,14 + ,12 + ,2 + ,11 + ,8 + ,3 + ,12 + ,14 + ,0 + ,12 + ,12 + ,9 + ,15 + ,11 + ,2 + ,16 + ,16 + ,7 + ,15 + ,8 + ,7 + ,12 + ,15 + ,0 + ,12 + ,7 + ,0 + ,8 + ,16 + ,10 + ,13 + ,14 + ,2 + ,11 + ,16 + ,1 + ,14 + ,9 + ,8 + ,15 + ,14 + ,6 + ,10 + ,11 + ,11 + ,11 + ,13 + ,3 + ,12 + ,15 + ,8 + ,15 + ,5 + ,6 + ,15 + ,15 + ,9 + ,14 + ,13 + ,9 + ,16 + ,11 + ,8 + ,15 + ,11 + ,8 + ,15 + ,12 + ,7 + ,13 + ,12 + ,6 + ,12 + ,12 + ,5 + ,17 + ,12 + ,4 + ,13 + ,14 + ,6 + ,15 + ,6 + ,3 + ,13 + ,7 + ,2 + ,15 + ,14 + ,12 + ,16 + ,14 + ,8 + ,15 + ,10 + ,5 + ,16 + ,13 + ,9 + ,15 + ,12 + ,6 + ,14 + ,9 + ,5 + ,15 + ,12 + ,2 + ,14 + ,16 + ,4 + ,13 + ,10 + ,7 + ,7 + ,14 + ,5 + ,17 + ,10 + ,6 + ,13 + ,16 + ,7 + ,15 + ,15 + ,8 + ,14 + ,12 + ,6 + ,13 + ,10 + ,0 + ,16 + ,8 + ,1 + ,12 + ,8 + ,5 + ,14 + ,11 + ,5 + ,17 + ,13 + ,5 + ,15 + ,16 + ,7 + ,17 + ,16 + ,7 + ,12 + ,14 + ,1 + ,16 + ,11 + ,3 + ,11 + ,4 + ,4 + ,15 + ,14 + ,8 + ,9 + ,9 + ,6 + ,16 + ,14 + ,6 + ,15 + ,8 + ,2 + ,10 + ,8 + ,2 + ,10 + ,11 + ,3 + ,15 + ,12 + ,3 + ,11 + ,11 + ,0 + ,13 + ,14 + ,2 + ,14 + ,15 + ,8 + ,18 + ,16 + ,8 + ,16 + ,16 + ,0 + ,14 + ,11 + ,5 + ,14 + ,14 + ,9 + ,14 + ,14 + ,6 + ,14 + ,12 + ,6 + ,12 + ,14 + ,3 + ,14 + ,8 + ,9 + ,15 + ,13 + ,7 + ,15 + ,16 + ,8 + ,15 + ,12 + ,0 + ,13 + ,16 + ,7 + ,17 + ,12 + ,0 + ,17 + ,11 + ,5 + ,19 + ,4 + ,0 + ,15 + ,16 + ,14 + ,13 + ,15 + ,5 + ,9 + ,10 + ,2 + ,15 + ,13 + ,8 + ,15 + ,15 + ,4 + ,15 + ,12 + ,2 + ,16 + ,14 + ,6 + ,11 + ,7 + ,3 + ,14 + ,19 + ,5 + ,11 + ,12 + ,9 + ,15 + ,12 + ,3 + ,13 + ,13 + ,3 + ,15 + ,15 + ,0 + ,16 + ,8 + ,10 + ,14 + ,12 + ,4 + ,15 + ,10 + ,2 + ,16 + ,8 + ,3 + ,16 + ,10 + ,10 + ,11 + ,15 + ,7 + ,12 + ,16 + ,0 + ,9 + ,13 + ,6 + ,16 + ,16 + ,8 + ,13 + ,9 + ,0 + ,16 + ,14 + ,4 + ,12 + ,14 + ,10 + ,9 + ,12 + ,5 + ,13) + ,dim=c(3 + ,156) + ,dimnames=list(c('IEP' + ,'WP' + ,'HS') + ,1:156)) > y <- array(NA,dim=c(3,156),dimnames=list(c('IEP','WP','HS'),1:156)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par4 = 'no' > par3 = '3' > par2 = 'none' > par1 = '2' > #'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(party) Loading required package: survival Loading required package: splines Loading required package: grid Loading required package: modeltools Loading required package: stats4 Loading required package: coin Loading required package: mvtnorm Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric Loading required package: sandwich Loading required package: strucchange Loading required package: vcd Loading required package: MASS Loading required package: colorspace > library(Hmisc) Attaching package: 'Hmisc' The following object(s) are masked from package:survival : untangle.specials The following object(s) are masked from package:base : format.pval, round.POSIXt, trunc.POSIXt, units > par1 <- as.numeric(par1) > par3 <- as.numeric(par3) > x <- data.frame(t(y)) > is.data.frame(x) [1] TRUE > x <- x[!is.na(x[,par1]),] > k <- length(x[1,]) > n <- length(x[,1]) > colnames(x)[par1] [1] "WP" > x[,par1] [1] 5 3 0 7 4 1 6 3 12 0 5 6 6 6 2 1 5 7 3 3 3 7 8 6 3 [26] 5 5 10 2 6 4 6 8 4 5 10 6 7 4 10 4 3 3 3 3 7 15 0 0 4 [51] 5 5 2 3 0 9 2 7 7 0 0 10 2 1 8 6 11 3 8 6 9 9 8 8 7 [76] 6 5 4 6 3 2 12 8 5 9 6 5 2 4 7 5 6 7 8 6 0 1 5 5 5 [101] 7 7 1 3 4 8 6 6 2 2 3 3 0 2 8 8 0 5 9 6 6 3 9 7 8 [126] 0 7 0 5 0 14 5 2 8 4 2 6 3 5 9 3 3 0 10 4 2 3 10 7 0 [151] 6 8 0 4 10 5 > if (par2 == 'kmeans') { + cl <- kmeans(x[,par1], par3) + print(cl) + clm <- matrix(cbind(cl$centers,1:par3),ncol=2) + clm <- clm[sort.list(clm[,1]),] + for (i in 1:par3) { + cl$cluster[cl$cluster==clm[i,2]] <- paste('C',i,sep='') + } + cl$cluster <- as.factor(cl$cluster) + print(cl$cluster) + x[,par1] <- cl$cluster + } > if (par2 == 'quantiles') { + x[,par1] <- cut2(x[,par1],g=par3) + } > if (par2 == 'hclust') { + hc <- hclust(dist(x[,par1])^2, 'cen') + print(hc) + memb <- cutree(hc, k = par3) + dum <- c(mean(x[memb==1,par1])) + for (i in 2:par3) { + dum <- c(dum, mean(x[memb==i,par1])) + } + hcm <- matrix(cbind(dum,1:par3),ncol=2) + hcm <- hcm[sort.list(hcm[,1]),] + for (i in 1:par3) { + memb[memb==hcm[i,2]] <- paste('C',i,sep='') + } + memb <- as.factor(memb) + print(memb) + x[,par1] <- memb + } > if (par2=='equal') { + ed <- cut(as.numeric(x[,par1]),par3,labels=paste('C',1:par3,sep='')) + x[,par1] <- as.factor(ed) + } > table(x[,par1]) 0 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 5 13 21 12 20 21 15 14 7 7 1 2 1 1 > colnames(x) [1] "IEP" "WP" "HS" > colnames(x)[par1] [1] "WP" > x[,par1] [1] 5 3 0 7 4 1 6 3 12 0 5 6 6 6 2 1 5 7 3 3 3 7 8 6 3 [26] 5 5 10 2 6 4 6 8 4 5 10 6 7 4 10 4 3 3 3 3 7 15 0 0 4 [51] 5 5 2 3 0 9 2 7 7 0 0 10 2 1 8 6 11 3 8 6 9 9 8 8 7 [76] 6 5 4 6 3 2 12 8 5 9 6 5 2 4 7 5 6 7 8 6 0 1 5 5 5 [101] 7 7 1 3 4 8 6 6 2 2 3 3 0 2 8 8 0 5 9 6 6 3 9 7 8 [126] 0 7 0 5 0 14 5 2 8 4 2 6 3 5 9 3 3 0 10 4 2 3 10 7 0 [151] 6 8 0 4 10 5 > if (par2 == 'none') { + m <- ctree(as.formula(paste(colnames(x)[par1],' ~ .',sep='')),data = x) + } > > #Note: the /var/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/rcomp/createtable") > > if (par2 != 'none') { + m <- ctree(as.formula(paste('as.factor(',colnames(x)[par1],') ~ .',sep='')),data = x) + if (par4=='yes') { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'10-Fold Cross Validation',3+2*par3,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'',1,TRUE) + a<-table.element(a,'Prediction (training)',par3+1,TRUE) + a<-table.element(a,'Prediction (testing)',par3+1,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Actual',1,TRUE) + for (jjj in 1:par3) a<-table.element(a,paste('C',jjj,sep=''),1,TRUE) + a<-table.element(a,'CV',1,TRUE) + for (jjj in 1:par3) a<-table.element(a,paste('C',jjj,sep=''),1,TRUE) + a<-table.element(a,'CV',1,TRUE) + a<-table.row.end(a) + for (i in 1:10) { + ind <- sample(2, nrow(x), replace=T, prob=c(0.9,0.1)) + m.ct <- ctree(as.formula(paste('as.factor(',colnames(x)[par1],') ~ .',sep='')),data =x[ind==1,]) + if (i==1) { + m.ct.i.pred <- predict(m.ct, newdata=x[ind==1,]) + m.ct.i.actu <- x[ind==1,par1] + m.ct.x.pred <- predict(m.ct, newdata=x[ind==2,]) + m.ct.x.actu <- x[ind==2,par1] + } else { + m.ct.i.pred <- c(m.ct.i.pred,predict(m.ct, newdata=x[ind==1,])) + m.ct.i.actu <- c(m.ct.i.actu,x[ind==1,par1]) + m.ct.x.pred <- c(m.ct.x.pred,predict(m.ct, newdata=x[ind==2,])) + m.ct.x.actu <- c(m.ct.x.actu,x[ind==2,par1]) + } + } + print(m.ct.i.tab <- table(m.ct.i.actu,m.ct.i.pred)) + numer <- 0 + for (i in 1:par3) { + print(m.ct.i.tab[i,i] / sum(m.ct.i.tab[i,])) + numer <- numer + m.ct.i.tab[i,i] + } + print(m.ct.i.cp <- numer / sum(m.ct.i.tab)) + print(m.ct.x.tab <- table(m.ct.x.actu,m.ct.x.pred)) + numer <- 0 + for (i in 1:par3) { + print(m.ct.x.tab[i,i] / sum(m.ct.x.tab[i,])) + numer <- numer + m.ct.x.tab[i,i] + } + print(m.ct.x.cp <- numer / sum(m.ct.x.tab)) + for (i in 1:par3) { + a<-table.row.start(a) + a<-table.element(a,paste('C',i,sep=''),1,TRUE) + for (jjj in 1:par3) a<-table.element(a,m.ct.i.tab[i,jjj]) + a<-table.element(a,round(m.ct.i.tab[i,i]/sum(m.ct.i.tab[i,]),4)) + for (jjj in 1:par3) a<-table.element(a,m.ct.x.tab[i,jjj]) + a<-table.element(a,round(m.ct.x.tab[i,i]/sum(m.ct.x.tab[i,]),4)) + a<-table.row.end(a) + } + a<-table.row.start(a) + a<-table.element(a,'Overall',1,TRUE) + for (jjj in 1:par3) a<-table.element(a,'-') + a<-table.element(a,round(m.ct.i.cp,4)) + for (jjj in 1:par3) a<-table.element(a,'-') + a<-table.element(a,round(m.ct.x.cp,4)) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/html/freestat/rcomp/tmp/1k8rk1292937844.tab") + } + } > m Conditional inference tree with 2 terminal nodes Response: WP Inputs: IEP, HS Number of observations: 156 1) IEP <= 12; criterion = 0.999, statistic = 13.099 2)* weights = 86 1) IEP > 12 3)* weights = 70 > postscript(file="/var/www/html/freestat/rcomp/tmp/2k8rk1292937844.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(m) > dev.off() null device 1 > postscript(file="/var/www/html/freestat/rcomp/tmp/3k8rk1292937844.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,par1] ~ as.factor(where(m)),main='Response by Terminal Node',xlab='Terminal Node',ylab='Response') > dev.off() null device 1 > if (par2 == 'none') { + forec <- predict(m) + result <- as.data.frame(cbind(x[,par1],forec,x[,par1]-forec)) + colnames(result) <- c('Actuals','Forecasts','Residuals') + print(result) + } Actuals Forecasts Residuals 1 5 5.885714 -0.8857143 2 3 4.302326 -1.3023256 3 0 5.885714 -5.8857143 4 7 4.302326 2.6976744 5 4 4.302326 -0.3023256 6 1 4.302326 -3.3023256 7 6 5.885714 0.1142857 8 3 4.302326 -1.3023256 9 12 4.302326 7.6976744 10 0 4.302326 -4.3023256 11 5 4.302326 0.6976744 12 6 4.302326 1.6976744 13 6 5.885714 0.1142857 14 6 4.302326 1.6976744 15 2 4.302326 -2.3023256 16 1 4.302326 -3.3023256 17 5 4.302326 0.6976744 18 7 5.885714 1.1142857 19 3 4.302326 -1.3023256 20 3 4.302326 -1.3023256 21 3 4.302326 -1.3023256 22 7 5.885714 1.1142857 23 8 4.302326 3.6976744 24 6 4.302326 1.6976744 25 3 5.885714 -2.8857143 26 5 5.885714 -0.8857143 27 5 4.302326 0.6976744 28 10 5.885714 4.1142857 29 2 5.885714 -3.8857143 30 6 5.885714 0.1142857 31 4 5.885714 -1.8857143 32 6 4.302326 1.6976744 33 8 5.885714 2.1142857 34 4 4.302326 -0.3023256 35 5 4.302326 0.6976744 36 10 5.885714 4.1142857 37 6 4.302326 1.6976744 38 7 4.302326 2.6976744 39 4 5.885714 -1.8857143 40 10 5.885714 4.1142857 41 4 5.885714 -1.8857143 42 3 5.885714 -2.8857143 43 3 4.302326 -1.3023256 44 3 4.302326 -1.3023256 45 3 4.302326 -1.3023256 46 7 5.885714 1.1142857 47 15 5.885714 9.1142857 48 0 4.302326 -4.3023256 49 0 4.302326 -4.3023256 50 4 5.885714 -1.8857143 51 5 4.302326 0.6976744 52 5 4.302326 0.6976744 53 2 4.302326 -2.3023256 54 3 4.302326 -1.3023256 55 0 5.885714 -5.8857143 56 9 4.302326 4.6976744 57 2 4.302326 -2.3023256 58 7 5.885714 1.1142857 59 7 4.302326 2.6976744 60 0 5.885714 -5.8857143 61 0 4.302326 -4.3023256 62 10 5.885714 4.1142857 63 2 5.885714 -3.8857143 64 1 5.885714 -4.8857143 65 8 4.302326 3.6976744 66 6 5.885714 0.1142857 67 11 4.302326 6.6976744 68 3 5.885714 -2.8857143 69 8 5.885714 2.1142857 70 6 4.302326 1.6976744 71 9 5.885714 3.1142857 72 9 5.885714 3.1142857 73 8 4.302326 3.6976744 74 8 4.302326 3.6976744 75 7 4.302326 2.6976744 76 6 4.302326 1.6976744 77 5 4.302326 0.6976744 78 4 4.302326 -0.3023256 79 6 5.885714 0.1142857 80 3 4.302326 -1.3023256 81 2 4.302326 -2.3023256 82 12 5.885714 6.1142857 83 8 5.885714 2.1142857 84 5 4.302326 0.6976744 85 9 5.885714 3.1142857 86 6 4.302326 1.6976744 87 5 4.302326 0.6976744 88 2 4.302326 -2.3023256 89 4 5.885714 -1.8857143 90 7 4.302326 2.6976744 91 5 5.885714 -0.8857143 92 6 4.302326 1.6976744 93 7 5.885714 1.1142857 94 8 5.885714 2.1142857 95 6 4.302326 1.6976744 96 0 4.302326 -4.3023256 97 1 4.302326 -3.3023256 98 5 4.302326 0.6976744 99 5 4.302326 0.6976744 100 5 5.885714 -0.8857143 101 7 5.885714 1.1142857 102 7 5.885714 1.1142857 103 1 5.885714 -4.8857143 104 3 4.302326 -1.3023256 105 4 4.302326 -0.3023256 106 8 5.885714 2.1142857 107 6 4.302326 1.6976744 108 6 5.885714 0.1142857 109 2 4.302326 -2.3023256 110 2 4.302326 -2.3023256 111 3 4.302326 -1.3023256 112 3 4.302326 -1.3023256 113 0 4.302326 -4.3023256 114 2 5.885714 -3.8857143 115 8 5.885714 2.1142857 116 8 5.885714 2.1142857 117 0 5.885714 -5.8857143 118 5 4.302326 0.6976744 119 9 5.885714 3.1142857 120 6 5.885714 0.1142857 121 6 4.302326 1.6976744 122 3 5.885714 -2.8857143 123 9 4.302326 4.6976744 124 7 5.885714 1.1142857 125 8 5.885714 2.1142857 126 0 4.302326 -4.3023256 127 7 5.885714 1.1142857 128 0 4.302326 -4.3023256 129 5 4.302326 0.6976744 130 0 4.302326 -4.3023256 131 14 5.885714 8.1142857 132 5 5.885714 -0.8857143 133 2 4.302326 -2.3023256 134 8 5.885714 2.1142857 135 4 5.885714 -1.8857143 136 2 4.302326 -2.3023256 137 6 5.885714 0.1142857 138 3 4.302326 -1.3023256 139 5 5.885714 -0.8857143 140 9 4.302326 4.6976744 141 3 4.302326 -1.3023256 142 3 5.885714 -2.8857143 143 0 5.885714 -5.8857143 144 10 4.302326 5.6976744 145 4 4.302326 -0.3023256 146 2 4.302326 -2.3023256 147 3 4.302326 -1.3023256 148 10 4.302326 5.6976744 149 7 5.885714 1.1142857 150 0 5.885714 -5.8857143 151 6 5.885714 0.1142857 152 8 5.885714 2.1142857 153 0 4.302326 -4.3023256 154 4 5.885714 -1.8857143 155 10 5.885714 4.1142857 156 5 4.302326 0.6976744 > if (par2 != 'none') { + print(cbind(as.factor(x[,par1]),predict(m))) + myt <- table(as.factor(x[,par1]),predict(m)) + print(myt) + } > postscript(file="/var/www/html/freestat/rcomp/tmp/46rpq1292937844.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > if(par2=='none') { + op <- par(mfrow=c(2,2)) + plot(density(result$Actuals),main='Kernel Density Plot of Actuals') + plot(density(result$Residuals),main='Kernel Density Plot of Residuals') + plot(result$Forecasts,result$Actuals,main='Actuals versus Predictions',xlab='Predictions',ylab='Actuals') + plot(density(result$Forecasts),main='Kernel Density Plot of Predictions') + par(op) + } > if(par2!='none') { + plot(myt,main='Confusion Matrix',xlab='Actual',ylab='Predicted') + } > dev.off() null device 1 > if (par2 == 'none') { + detcoef <- cor(result$Forecasts,result$Actuals) + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Goodness of Fit',2,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'Correlation',1,TRUE) + a<-table.element(a,round(detcoef,4)) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'R-squared',1,TRUE) + a<-table.element(a,round(detcoef*detcoef,4)) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'RMSE',1,TRUE) + a<-table.element(a,round(sqrt(mean((result$Residuals)^2)),4)) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/html/freestat/rcomp/tmp/59roe1292937844.tab") + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Actuals, Predictions, and Residuals',4,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'#',header=TRUE) + a<-table.element(a,'Actuals',header=TRUE) + a<-table.element(a,'Forecasts',header=TRUE) + a<-table.element(a,'Residuals',header=TRUE) + a<-table.row.end(a) + for (i in 1:length(result$Actuals)) { + a<-table.row.start(a) + a<-table.element(a,i,header=TRUE) + a<-table.element(a,result$Actuals[i]) + a<-table.element(a,result$Forecasts[i]) + a<-table.element(a,result$Residuals[i]) + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/html/freestat/rcomp/tmp/6da4j1292937844.tab") + } > if (par2 != 'none') { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Confusion Matrix (predicted in columns / actuals in rows)',par3+1,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'',1,TRUE) + for (i in 1:par3) { + a<-table.element(a,paste('C',i,sep=''),1,TRUE) + } + a<-table.row.end(a) + for (i in 1:par3) { + a<-table.row.start(a) + a<-table.element(a,paste('C',i,sep=''),1,TRUE) + for (j in 1:par3) { + a<-table.element(a,myt[i,j]) + } + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/www/html/freestat/rcomp/tmp/751l41292937844.tab") + } > > try(system("convert tmp/2k8rk1292937844.ps tmp/2k8rk1292937844.png",intern=TRUE)) character(0) > try(system("convert tmp/3k8rk1292937844.ps tmp/3k8rk1292937844.png",intern=TRUE)) character(0) > try(system("convert tmp/46rpq1292937844.ps tmp/46rpq1292937844.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.494 0.782 5.546