R version 2.12.0 (2010-10-15) Copyright (C) 2010 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 = '1' > 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] "TijdInRFC" > x[,par1] [1] 272545 179444 222373 218443 167843 70849 33186 216660 213274 307153 [11] 237633 166215 364402 244103 384448 325587 323652 176082 266736 278265 [21] 180393 189897 234247 238002 267268 270787 155915 342564 282172 216584 [31] 318563 98672 391593 273950 227636 115658 349863 324178 178083 195153 [41] 177694 153778 455168 78800 208051 348077 175523 224591 24188 372238 [51] 65029 101097 279012 317644 340471 358958 252529 377482 304468 270190 [61] 264889 228595 216027 198798 238146 234891 175816 239314 73566 242622 [71] 187167 209049 360592 342846 207650 206500 182357 153613 456979 145943 [81] 280366 80953 150216 167878 369718 322454 179797 264350 262793 189142 [91] 275997 328875 189252 222504 287386 389104 397681 287748 294320 186856 [101] 43287 185468 235352 268077 305195 143356 154287 307000 298039 23623 [111] 195817 61857 163766 21054 252805 31961 317367 240153 175083 152043 [121] 38214 216299 357602 198104 410803 316105 397297 187992 102424 286327 [131] 409878 143860 391854 157429 258751 282399 217665 367246 239072 173260 [141] 323545 168994 253330 301703 246435 384136 46660 116678 206501 > 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]) 21054 23623 24188 31961 33186 38214 43287 46660 61857 65029 70849 1 1 1 1 1 1 1 1 1 1 1 73566 78800 80953 98672 101097 102424 115658 116678 143356 143860 145943 1 1 1 1 1 1 1 1 1 1 1 150216 152043 153613 153778 154287 155915 157429 163766 166215 167843 167878 1 1 1 1 1 1 1 1 1 1 1 168994 173260 175083 175523 175816 176082 177694 178083 179444 179797 180393 1 1 1 1 1 1 1 1 1 1 1 182357 185468 186856 187167 187992 189142 189252 189897 195153 195817 198104 1 1 1 1 1 1 1 1 1 1 1 198798 206500 206501 207650 208051 209049 213274 216027 216299 216584 216660 1 1 1 1 1 1 1 1 1 1 1 217665 218443 222373 222504 224591 227636 228595 234247 234891 235352 237633 1 1 1 1 1 1 1 1 1 1 1 238002 238146 239072 239314 240153 242622 244103 246435 252529 252805 253330 1 1 1 1 1 1 1 1 1 1 1 258751 262793 264350 264889 266736 267268 268077 270190 270787 272545 273950 1 1 1 1 1 1 1 1 1 1 1 275997 278265 279012 280366 282172 282399 286327 287386 287748 294320 298039 1 1 1 1 1 1 1 1 1 1 1 301703 304468 305195 307000 307153 316105 317367 317644 318563 322454 323545 1 1 1 1 1 1 1 1 1 1 1 323652 324178 325587 328875 340471 342564 342846 348077 349863 357602 358958 1 1 1 1 1 1 1 1 1 1 1 360592 364402 367246 369718 372238 377482 384136 384448 389104 391593 391854 1 1 1 1 1 1 1 1 1 1 1 397297 397681 409878 410803 455168 456979 1 1 1 1 1 1 > colnames(x) [1] "TijdInRFC" "Characters" > colnames(x)[par1] [1] "TijdInRFC" > x[,par1] [1] 272545 179444 222373 218443 167843 70849 33186 216660 213274 307153 [11] 237633 166215 364402 244103 384448 325587 323652 176082 266736 278265 [21] 180393 189897 234247 238002 267268 270787 155915 342564 282172 216584 [31] 318563 98672 391593 273950 227636 115658 349863 324178 178083 195153 [41] 177694 153778 455168 78800 208051 348077 175523 224591 24188 372238 [51] 65029 101097 279012 317644 340471 358958 252529 377482 304468 270190 [61] 264889 228595 216027 198798 238146 234891 175816 239314 73566 242622 [71] 187167 209049 360592 342846 207650 206500 182357 153613 456979 145943 [81] 280366 80953 150216 167878 369718 322454 179797 264350 262793 189142 [91] 275997 328875 189252 222504 287386 389104 397681 287748 294320 186856 [101] 43287 185468 235352 268077 305195 143356 154287 307000 298039 23623 [111] 195817 61857 163766 21054 252805 31961 317367 240153 175083 152043 [121] 38214 216299 357602 198104 410803 316105 397297 187992 102424 286327 [131] 409878 143860 391854 157429 258751 282399 217665 367246 239072 173260 [141] 323545 168994 253330 301703 246435 384136 46660 116678 206501 > if (par2 == 'none') { + m <- ctree(as.formula(paste(colnames(x)[par1],' ~ .',sep='')),data = x) + } > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/158nf1324216808.tab") + } + } > m Conditional inference tree with 4 terminal nodes Response: TijdInRFC Input: Characters Number of observations: 149 1) Characters <= 56622; criterion = 1, statistic = 56.852 2) Characters <= 33032; criterion = 0.999, statistic = 10.687 3)* weights = 14 2) Characters > 33032 4)* weights = 10 1) Characters > 56622 5) Characters <= 100350; criterion = 1, statistic = 13.119 6)* weights = 48 5) Characters > 100350 7)* weights = 77 > postscript(file="/var/www/rcomp/tmp/2zpz91324216808.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/rcomp/tmp/30enz1324216808.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 272545 284084.9 -11539.9351 2 179444 284084.9 -104640.9351 3 222373 284084.9 -61711.9351 4 218443 284084.9 -65641.9351 5 167843 138672.6 29170.4000 6 70849 223908.1 -153059.0625 7 33186 61793.5 -28607.5000 8 216660 284084.9 -67424.9351 9 213274 223908.1 -10634.0625 10 307153 223908.1 83244.9375 11 237633 223908.1 13724.9375 12 166215 223908.1 -57693.0625 13 364402 284084.9 80317.0649 14 244103 223908.1 20194.9375 15 384448 284084.9 100363.0649 16 325587 284084.9 41502.0649 17 323652 284084.9 39567.0649 18 176082 284084.9 -108002.9351 19 266736 284084.9 -17348.9351 20 278265 284084.9 -5819.9351 21 180393 223908.1 -43515.0625 22 189897 284084.9 -94187.9351 23 234247 223908.1 10338.9375 24 238002 284084.9 -46082.9351 25 267268 284084.9 -16816.9351 26 270787 223908.1 46878.9375 27 155915 138672.6 17242.4000 28 342564 284084.9 58479.0649 29 282172 284084.9 -1912.9351 30 216584 223908.1 -7324.0625 31 318563 284084.9 34478.0649 32 98672 223908.1 -125236.0625 33 391593 284084.9 107508.0649 34 273950 223908.1 50041.9375 35 227636 223908.1 3727.9375 36 115658 61793.5 53864.5000 37 349863 284084.9 65778.0649 38 324178 223908.1 100269.9375 39 178083 223908.1 -45825.0625 40 195153 223908.1 -28755.0625 41 177694 223908.1 -46214.0625 42 153778 223908.1 -70130.0625 43 455168 284084.9 171083.0649 44 78800 61793.5 17006.5000 45 208051 223908.1 -15857.0625 46 348077 284084.9 63992.0649 47 175523 223908.1 -48385.0625 48 224591 223908.1 682.9375 49 24188 61793.5 -37605.5000 50 372238 284084.9 88153.0649 51 65029 61793.5 3235.5000 52 101097 61793.5 39303.5000 53 279012 223908.1 55103.9375 54 317644 284084.9 33559.0649 55 340471 284084.9 56386.0649 56 358958 284084.9 74873.0649 57 252529 223908.1 28620.9375 58 377482 284084.9 93397.0649 59 304468 284084.9 20383.0649 60 270190 223908.1 46281.9375 61 264889 284084.9 -19195.9351 62 228595 284084.9 -55489.9351 63 216027 223908.1 -7881.0625 64 198798 284084.9 -85286.9351 65 238146 223908.1 14237.9375 66 234891 284084.9 -49193.9351 67 175816 284084.9 -108268.9351 68 239314 223908.1 15405.9375 69 73566 61793.5 11772.5000 70 242622 223908.1 18713.9375 71 187167 223908.1 -36741.0625 72 209049 223908.1 -14859.0625 73 360592 284084.9 76507.0649 74 342846 284084.9 58761.0649 75 207650 284084.9 -76434.9351 76 206500 223908.1 -17408.0625 77 182357 223908.1 -41551.0625 78 153613 138672.6 14940.4000 79 456979 284084.9 172894.0649 80 145943 138672.6 7270.4000 81 280366 284084.9 -3718.9351 82 80953 138672.6 -57719.6000 83 150216 61793.5 88422.5000 84 167878 284084.9 -116206.9351 85 369718 284084.9 85633.0649 86 322454 223908.1 98545.9375 87 179797 284084.9 -104287.9351 88 264350 223908.1 40441.9375 89 262793 284084.9 -21291.9351 90 189142 223908.1 -34766.0625 91 275997 223908.1 52088.9375 92 328875 284084.9 44790.0649 93 189252 284084.9 -94832.9351 94 222504 284084.9 -61580.9351 95 287386 284084.9 3301.0649 96 389104 284084.9 105019.0649 97 397681 284084.9 113596.0649 98 287748 284084.9 3663.0649 99 294320 284084.9 10235.0649 100 186856 223908.1 -37052.0625 101 43287 138672.6 -95385.6000 102 185468 138672.6 46795.4000 103 235352 284084.9 -48732.9351 104 268077 223908.1 44168.9375 105 305195 284084.9 21110.0649 106 143356 284084.9 -140728.9351 107 154287 284084.9 -129797.9351 108 307000 284084.9 22915.0649 109 298039 284084.9 13954.0649 110 23623 61793.5 -38170.5000 111 195817 223908.1 -28091.0625 112 61857 61793.5 63.5000 113 163766 138672.6 25093.4000 114 21054 61793.5 -40739.5000 115 252805 284084.9 -31279.9351 116 31961 61793.5 -29832.5000 117 317367 223908.1 93458.9375 118 240153 284084.9 -43931.9351 119 175083 284084.9 -109001.9351 120 152043 284084.9 -132041.9351 121 38214 61793.5 -23579.5000 122 216299 284084.9 -67785.9351 123 357602 284084.9 73517.0649 124 198104 284084.9 -85980.9351 125 410803 284084.9 126718.0649 126 316105 284084.9 32020.0649 127 397297 284084.9 113212.0649 128 187992 223908.1 -35916.0625 129 102424 223908.1 -121484.0625 130 286327 284084.9 2242.0649 131 409878 284084.9 125793.0649 132 143860 284084.9 -140224.9351 133 391854 284084.9 107769.0649 134 157429 223908.1 -66479.0625 135 258751 223908.1 34842.9375 136 282399 223908.1 58490.9375 137 217665 284084.9 -66419.9351 138 367246 284084.9 83161.0649 139 239072 284084.9 -45012.9351 140 173260 138672.6 34587.4000 141 323545 284084.9 39460.0649 142 168994 284084.9 -115090.9351 143 253330 284084.9 -30754.9351 144 301703 284084.9 17618.0649 145 246435 223908.1 22526.9375 146 384136 223908.1 160227.9375 147 46660 61793.5 -15133.5000 148 116678 138672.6 -21994.6000 149 206501 223908.1 -17407.0625 > 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/rcomp/tmp/4bgux1324216809.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/rcomp/tmp/55uxe1324216809.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/rcomp/tmp/699qw1324216809.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/rcomp/tmp/74ny41324216809.tab") + } > > try(system("convert tmp/2zpz91324216808.ps tmp/2zpz91324216808.png",intern=TRUE)) character(0) > try(system("convert tmp/30enz1324216808.ps tmp/30enz1324216808.png",intern=TRUE)) character(0) > try(system("convert tmp/4bgux1324216809.ps tmp/4bgux1324216809.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.790 0.110 2.891