R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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(272545 + ,140824 + ,179444 + ,110459 + ,222373 + ,105079 + ,218443 + ,112098 + ,167843 + ,43929 + ,70849 + ,76173 + ,33186 + ,22807 + ,216660 + ,144408 + ,213274 + ,66485 + ,307153 + ,79089 + ,237633 + ,81625 + ,166215 + ,68788 + ,364402 + ,103297 + ,244103 + ,69446 + ,384448 + ,114948 + ,325587 + ,167949 + ,323652 + ,125081 + ,176082 + ,125818 + ,266736 + ,136588 + ,278265 + ,112431 + ,180393 + ,82317 + ,189897 + ,118906 + ,234247 + ,83515 + ,238002 + ,104581 + ,267268 + ,103129 + ,270787 + ,83243 + ,155915 + ,37110 + ,342564 + ,113344 + ,282172 + ,139165 + ,216584 + ,86652 + ,318563 + ,112302 + ,98672 + ,69652 + ,391593 + ,119442 + ,273950 + ,69867 + ,227636 + ,70168 + ,115658 + ,31081 + ,349863 + ,103925 + ,324178 + ,92622 + ,178083 + ,79011 + ,195153 + ,93487 + ,177694 + ,64520 + ,153778 + ,93473 + ,455168 + ,114360 + ,78800 + ,33032 + ,208051 + ,96125 + ,348077 + ,151911 + ,175523 + ,89256 + ,224591 + ,95671 + ,24188 + ,5950 + ,372238 + ,149695 + ,65029 + ,32551 + ,101097 + ,31701 + ,279012 + ,100087 + ,317644 + ,169707 + ,340471 + ,150491 + ,358958 + ,120192 + ,252529 + ,95893 + ,377482 + ,151715 + ,304468 + ,176225 + ,270190 + ,59900 + ,264889 + ,104767 + ,228595 + ,114799 + ,216027 + ,72128 + ,198798 + ,143592 + ,238146 + ,89626 + ,234891 + ,131072 + ,175816 + ,126817 + ,239314 + ,81351 + ,73566 + ,22618 + ,242622 + ,88977 + ,187167 + ,92059 + ,209049 + ,81897 + ,360592 + ,108146 + ,342846 + ,126372 + ,207650 + ,249771 + ,206500 + ,71154 + ,182357 + ,71571 + ,153613 + ,55918 + ,456979 + ,160141 + ,145943 + ,38692 + ,280366 + ,102812 + ,80953 + ,56622 + ,150216 + ,15986 + ,167878 + ,123534 + ,369718 + ,108535 + ,322454 + ,93879 + ,179797 + ,144551 + ,264350 + ,56750 + ,262793 + ,127654 + ,189142 + ,65594 + ,275997 + ,59938 + ,328875 + ,146975 + ,189252 + ,143372 + ,222504 + ,168553 + ,287386 + ,183500 + ,389104 + ,165986 + ,397681 + ,184923 + ,287748 + ,140358 + ,294320 + ,149959 + ,186856 + ,57224 + ,43287 + ,43750 + ,185468 + ,48029 + ,235352 + ,104978 + ,268077 + ,100046 + ,305195 + ,101047 + ,143356 + ,197426 + ,154287 + ,160902 + ,307000 + ,147172 + ,298039 + ,109432 + ,23623 + ,1168 + ,195817 + ,83248 + ,61857 + ,25162 + ,163766 + ,45724 + ,21054 + ,855 + ,252805 + ,101382 + ,31961 + ,14116 + ,317367 + ,89506 + ,240153 + ,135356 + ,175083 + ,116066 + ,152043 + ,144244 + ,38214 + ,8773 + ,216299 + ,102153 + ,357602 + ,117440 + ,198104 + ,104128 + ,410803 + ,134238 + ,316105 + ,134047 + ,397297 + ,279488 + ,187992 + ,79756 + ,102424 + ,66089 + ,286327 + ,102070 + ,409878 + ,146760 + ,143860 + ,154771 + ,391854 + ,165933 + ,157429 + ,64593 + ,258751 + ,92280 + ,282399 + ,67150 + ,217665 + ,128692 + ,367246 + ,124089 + ,239072 + ,125386 + ,173260 + ,37238 + ,323545 + ,140015 + ,168994 + ,150047 + ,253330 + ,154451 + ,301703 + ,156349 + ,246435 + ,84601 + ,384136 + ,68946 + ,46660 + ,6179 + ,116678 + ,52789 + ,206501 + ,100350) + ,dim=c(2 + ,149) + ,dimnames=list(c('TijdInRFC' + ,'Characters') + ,1:149)) > y <- array(NA,dim=c(2,149),dimnames=list(c('TijdInRFC','Characters'),1:149)) > 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 = '' > par2 = 'none' > par1 = '2' > 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 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] "Characters" > x[,par1] [1] 140824 110459 105079 112098 43929 76173 22807 144408 66485 79089 [11] 81625 68788 103297 69446 114948 167949 125081 125818 136588 112431 [21] 82317 118906 83515 104581 103129 83243 37110 113344 139165 86652 [31] 112302 69652 119442 69867 70168 31081 103925 92622 79011 93487 [41] 64520 93473 114360 33032 96125 151911 89256 95671 5950 149695 [51] 32551 31701 100087 169707 150491 120192 95893 151715 176225 59900 [61] 104767 114799 72128 143592 89626 131072 126817 81351 22618 88977 [71] 92059 81897 108146 126372 249771 71154 71571 55918 160141 38692 [81] 102812 56622 15986 123534 108535 93879 144551 56750 127654 65594 [91] 59938 146975 143372 168553 183500 165986 184923 140358 149959 57224 [101] 43750 48029 104978 100046 101047 197426 160902 147172 109432 1168 [111] 83248 25162 45724 855 101382 14116 89506 135356 116066 144244 [121] 8773 102153 117440 104128 134238 134047 279488 79756 66089 102070 [131] 146760 154771 165933 64593 92280 67150 128692 124089 125386 37238 [141] 140015 150047 154451 156349 84601 68946 6179 52789 100350 > 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]) 855 1168 5950 6179 8773 14116 15986 22618 22807 25162 31081 1 1 1 1 1 1 1 1 1 1 1 31701 32551 33032 37110 37238 38692 43750 43929 45724 48029 52789 1 1 1 1 1 1 1 1 1 1 1 55918 56622 56750 57224 59900 59938 64520 64593 65594 66089 66485 1 1 1 1 1 1 1 1 1 1 1 67150 68788 68946 69446 69652 69867 70168 71154 71571 72128 76173 1 1 1 1 1 1 1 1 1 1 1 79011 79089 79756 81351 81625 81897 82317 83243 83248 83515 84601 1 1 1 1 1 1 1 1 1 1 1 86652 88977 89256 89506 89626 92059 92280 92622 93473 93487 93879 1 1 1 1 1 1 1 1 1 1 1 95671 95893 96125 100046 100087 100350 101047 101382 102070 102153 102812 1 1 1 1 1 1 1 1 1 1 1 103129 103297 103925 104128 104581 104767 104978 105079 108146 108535 109432 1 1 1 1 1 1 1 1 1 1 1 110459 112098 112302 112431 113344 114360 114799 114948 116066 117440 118906 1 1 1 1 1 1 1 1 1 1 1 119442 120192 123534 124089 125081 125386 125818 126372 126817 127654 128692 1 1 1 1 1 1 1 1 1 1 1 131072 134047 134238 135356 136588 139165 140015 140358 140824 143372 143592 1 1 1 1 1 1 1 1 1 1 1 144244 144408 144551 146760 146975 147172 149695 149959 150047 150491 151715 1 1 1 1 1 1 1 1 1 1 1 151911 154451 154771 156349 160141 160902 165933 165986 167949 168553 169707 1 1 1 1 1 1 1 1 1 1 1 176225 183500 184923 197426 249771 279488 1 1 1 1 1 1 > colnames(x) [1] "TijdInRFC" "Characters" > colnames(x)[par1] [1] "Characters" > x[,par1] [1] 140824 110459 105079 112098 43929 76173 22807 144408 66485 79089 [11] 81625 68788 103297 69446 114948 167949 125081 125818 136588 112431 [21] 82317 118906 83515 104581 103129 83243 37110 113344 139165 86652 [31] 112302 69652 119442 69867 70168 31081 103925 92622 79011 93487 [41] 64520 93473 114360 33032 96125 151911 89256 95671 5950 149695 [51] 32551 31701 100087 169707 150491 120192 95893 151715 176225 59900 [61] 104767 114799 72128 143592 89626 131072 126817 81351 22618 88977 [71] 92059 81897 108146 126372 249771 71154 71571 55918 160141 38692 [81] 102812 56622 15986 123534 108535 93879 144551 56750 127654 65594 [91] 59938 146975 143372 168553 183500 165986 184923 140358 149959 57224 [101] 43750 48029 104978 100046 101047 197426 160902 147172 109432 1168 [111] 83248 25162 45724 855 101382 14116 89506 135356 116066 144244 [121] 8773 102153 117440 104128 134238 134047 279488 79756 66089 102070 [131] 146760 154771 165933 64593 92280 67150 128692 124089 125386 37238 [141] 140015 150047 154451 156349 84601 68946 6179 52789 100350 > if (par2 == 'none') { + m <- ctree(as.formula(paste(colnames(x)[par1],' ~ .',sep='')),data = x) + } > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/19m8v1324217183.tab") + } + } > m Conditional inference tree with 3 terminal nodes Response: Characters Input: TijdInRFC Number of observations: 149 1) TijdInRFC <= 116678; criterion = 1, statistic = 56.852 2)* weights = 19 1) TijdInRFC > 116678 3) TijdInRFC <= 286327; criterion = 1, statistic = 19.256 4)* weights = 87 3) TijdInRFC > 286327 5)* weights = 43 > postscript(file="/var/wessaorg/rcomp/tmp/2ixep1324217183.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/wessaorg/rcomp/tmp/3hjcu1324217183.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 140824 99187.13 41636.87356 2 110459 99187.13 11271.87356 3 105079 99187.13 5891.87356 4 112098 99187.13 12910.87356 5 43929 99187.13 -55258.12644 6 76173 31635.16 44537.84211 7 22807 31635.16 -8828.15789 8 144408 99187.13 45220.87356 9 66485 99187.13 -32702.12644 10 79089 134872.81 -55783.81395 11 81625 99187.13 -17562.12644 12 68788 99187.13 -30399.12644 13 103297 134872.81 -31575.81395 14 69446 99187.13 -29741.12644 15 114948 134872.81 -19924.81395 16 167949 134872.81 33076.18605 17 125081 134872.81 -9791.81395 18 125818 99187.13 26630.87356 19 136588 99187.13 37400.87356 20 112431 99187.13 13243.87356 21 82317 99187.13 -16870.12644 22 118906 99187.13 19718.87356 23 83515 99187.13 -15672.12644 24 104581 99187.13 5393.87356 25 103129 99187.13 3941.87356 26 83243 99187.13 -15944.12644 27 37110 99187.13 -62077.12644 28 113344 134872.81 -21528.81395 29 139165 99187.13 39977.87356 30 86652 99187.13 -12535.12644 31 112302 134872.81 -22570.81395 32 69652 31635.16 38016.84211 33 119442 134872.81 -15430.81395 34 69867 99187.13 -29320.12644 35 70168 99187.13 -29019.12644 36 31081 31635.16 -554.15789 37 103925 134872.81 -30947.81395 38 92622 134872.81 -42250.81395 39 79011 99187.13 -20176.12644 40 93487 99187.13 -5700.12644 41 64520 99187.13 -34667.12644 42 93473 99187.13 -5714.12644 43 114360 134872.81 -20512.81395 44 33032 31635.16 1396.84211 45 96125 99187.13 -3062.12644 46 151911 134872.81 17038.18605 47 89256 99187.13 -9931.12644 48 95671 99187.13 -3516.12644 49 5950 31635.16 -25685.15789 50 149695 134872.81 14822.18605 51 32551 31635.16 915.84211 52 31701 31635.16 65.84211 53 100087 99187.13 899.87356 54 169707 134872.81 34834.18605 55 150491 134872.81 15618.18605 56 120192 134872.81 -14680.81395 57 95893 99187.13 -3294.12644 58 151715 134872.81 16842.18605 59 176225 134872.81 41352.18605 60 59900 99187.13 -39287.12644 61 104767 99187.13 5579.87356 62 114799 99187.13 15611.87356 63 72128 99187.13 -27059.12644 64 143592 99187.13 44404.87356 65 89626 99187.13 -9561.12644 66 131072 99187.13 31884.87356 67 126817 99187.13 27629.87356 68 81351 99187.13 -17836.12644 69 22618 31635.16 -9017.15789 70 88977 99187.13 -10210.12644 71 92059 99187.13 -7128.12644 72 81897 99187.13 -17290.12644 73 108146 134872.81 -26726.81395 74 126372 134872.81 -8500.81395 75 249771 99187.13 150583.87356 76 71154 99187.13 -28033.12644 77 71571 99187.13 -27616.12644 78 55918 99187.13 -43269.12644 79 160141 134872.81 25268.18605 80 38692 99187.13 -60495.12644 81 102812 99187.13 3624.87356 82 56622 31635.16 24986.84211 83 15986 99187.13 -83201.12644 84 123534 99187.13 24346.87356 85 108535 134872.81 -26337.81395 86 93879 134872.81 -40993.81395 87 144551 99187.13 45363.87356 88 56750 99187.13 -42437.12644 89 127654 99187.13 28466.87356 90 65594 99187.13 -33593.12644 91 59938 99187.13 -39249.12644 92 146975 134872.81 12102.18605 93 143372 99187.13 44184.87356 94 168553 99187.13 69365.87356 95 183500 134872.81 48627.18605 96 165986 134872.81 31113.18605 97 184923 134872.81 50050.18605 98 140358 134872.81 5485.18605 99 149959 134872.81 15086.18605 100 57224 99187.13 -41963.12644 101 43750 31635.16 12114.84211 102 48029 99187.13 -51158.12644 103 104978 99187.13 5790.87356 104 100046 99187.13 858.87356 105 101047 134872.81 -33825.81395 106 197426 99187.13 98238.87356 107 160902 99187.13 61714.87356 108 147172 134872.81 12299.18605 109 109432 134872.81 -25440.81395 110 1168 31635.16 -30467.15789 111 83248 99187.13 -15939.12644 112 25162 31635.16 -6473.15789 113 45724 99187.13 -53463.12644 114 855 31635.16 -30780.15789 115 101382 99187.13 2194.87356 116 14116 31635.16 -17519.15789 117 89506 134872.81 -45366.81395 118 135356 99187.13 36168.87356 119 116066 99187.13 16878.87356 120 144244 99187.13 45056.87356 121 8773 31635.16 -22862.15789 122 102153 99187.13 2965.87356 123 117440 134872.81 -17432.81395 124 104128 99187.13 4940.87356 125 134238 134872.81 -634.81395 126 134047 134872.81 -825.81395 127 279488 134872.81 144615.18605 128 79756 99187.13 -19431.12644 129 66089 31635.16 34453.84211 130 102070 99187.13 2882.87356 131 146760 134872.81 11887.18605 132 154771 99187.13 55583.87356 133 165933 134872.81 31060.18605 134 64593 99187.13 -34594.12644 135 92280 99187.13 -6907.12644 136 67150 99187.13 -32037.12644 137 128692 99187.13 29504.87356 138 124089 134872.81 -10783.81395 139 125386 99187.13 26198.87356 140 37238 99187.13 -61949.12644 141 140015 134872.81 5142.18605 142 150047 99187.13 50859.87356 143 154451 99187.13 55263.87356 144 156349 134872.81 21476.18605 145 84601 99187.13 -14586.12644 146 68946 134872.81 -65926.81395 147 6179 31635.16 -25456.15789 148 52789 31635.16 21153.84211 149 100350 99187.13 1162.87356 > if (par2 != 'none') { + print(cbind(as.factor(x[,par1]),predict(m))) + myt <- table(as.factor(x[,par1]),predict(m)) + print(myt) + } > postscript(file="/var/wessaorg/rcomp/tmp/442kd1324217183.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/wessaorg/rcomp/tmp/5mbwo1324217183.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/wessaorg/rcomp/tmp/68pbg1324217183.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/wessaorg/rcomp/tmp/7sm601324217183.tab") + } > > try(system("convert tmp/2ixep1324217183.ps tmp/2ixep1324217183.png",intern=TRUE)) character(0) > try(system("convert tmp/3hjcu1324217183.ps tmp/3hjcu1324217183.png",intern=TRUE)) character(0) > try(system("convert tmp/442kd1324217183.ps tmp/442kd1324217183.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.875 0.294 3.182