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(3111 + ,5140 + ,17153 + ,2.5 + ,766 + ,332 + ,2.4 + ,3995 + ,4749 + ,15579 + ,1.8 + ,294 + ,369 + ,2.4 + ,5245 + ,3635 + ,16755 + ,7.3 + ,235 + ,384 + ,2.4 + ,5588 + ,4305 + ,16585 + ,9.9 + ,462 + ,373 + ,2.1 + ,10681 + ,5805 + ,16572 + ,13.2 + ,919 + ,378 + ,2 + ,10516 + ,4260 + ,16325 + ,17.8 + ,346 + ,426 + ,2 + ,7496 + ,3869 + ,17913 + ,18.8 + ,298 + ,423 + ,2.1 + ,9935 + ,7325 + ,17572 + ,19.3 + ,92 + ,397 + ,2.1 + ,10249 + ,9280 + ,17338 + ,13.9 + ,516 + ,422 + ,2 + ,6271 + ,6222 + ,17087 + ,7.5 + ,843 + ,409 + ,2 + ,3616 + ,3272 + ,15864 + ,8 + ,395 + ,430 + ,2 + ,3724 + ,7598 + ,15554 + ,4 + ,961 + ,412 + ,1.7 + ,2886 + ,1345 + ,16229 + ,3.6 + ,1231 + ,470 + ,1.3 + ,3318 + ,1900 + ,15180 + ,4.8 + ,794 + ,491 + ,1.2 + ,4166 + ,1480 + ,16215 + ,5.9 + ,420 + ,504 + ,1.1 + ,6401 + ,1472 + ,15801 + ,10.4 + ,331 + ,484 + ,1.4 + ,9209 + ,3823 + ,15751 + ,12.3 + ,312 + ,474 + ,1.5 + ,9820 + ,4454 + ,16477 + ,15.5 + ,692 + ,508 + ,1.4 + ,7470 + ,3357 + ,17324 + ,16.7 + ,1221 + ,492 + ,1.1 + ,8207 + ,5393 + ,16919 + ,18.8 + ,1272 + ,452 + ,1.1 + ,9564 + ,8329 + ,16438 + ,15.2 + ,622 + ,457 + ,1 + ,5309 + ,4152 + ,16239 + ,11.3 + ,479 + ,457 + ,1.4 + ,3385 + ,4042 + ,15613 + ,6.3 + ,757 + ,471 + ,1.3 + ,3706 + ,7747 + ,15821 + ,3.2 + ,463 + ,451 + ,1.2 + ,2733 + ,1451 + ,15678 + ,5.3 + ,534 + ,493 + ,1.5 + ,3045 + ,911 + ,14671 + ,2.4 + ,731 + ,514 + ,1.6 + ,3449 + ,406 + ,15876 + ,6.5 + ,498 + ,522 + ,1.8 + ,5542 + ,1387 + ,15563 + ,10.4 + ,629 + ,490 + ,1.5 + ,10072 + ,2150 + ,15711 + ,12.6 + ,542 + ,484 + ,1.3 + ,9418 + ,1577 + ,15583 + ,16.8 + ,519 + ,506 + ,1.6 + ,7516 + ,2642 + ,16405 + ,17.7 + ,1585 + ,501 + ,1.6 + ,7840 + ,4273 + ,16701 + ,16.2 + ,956 + ,462 + ,1.8 + ,10081 + ,8064 + ,16194 + ,15.7 + ,633 + ,465 + ,1.8 + ,4956 + ,3243 + ,16024 + ,13.3 + ,561 + ,454 + ,1.6 + ,3641 + ,1112 + ,14728 + ,6.9 + ,976 + ,464 + ,1.8 + ,3970 + ,2280 + ,14776 + ,4 + ,565 + ,427 + ,2 + ,2931 + ,505 + ,15399 + ,1.5 + ,151 + ,460 + ,1.3 + ,3170 + ,744 + ,14286 + ,2.9 + ,588 + ,473 + ,1.1 + ,3889 + ,1369 + ,15646 + ,3.9 + ,1043 + ,465 + ,1 + ,4850 + ,531 + ,14543 + ,9 + ,398 + ,422 + ,1.2 + ,8037 + ,1041 + ,15673 + ,14.5 + ,902 + ,415 + ,1.2 + ,12370 + ,2076 + ,15171 + ,16.7 + ,180 + ,413 + ,1.3 + ,6712 + ,577 + ,15999 + ,22.3 + ,150 + ,420 + ,1.3 + ,7297 + ,5080 + ,1626 + ,16.4 + ,1805 + ,363 + ,1.4 + ,10613 + ,6584 + ,16123 + ,17.9 + ,86 + ,376 + ,1.1 + ,5184 + ,3761 + ,16144 + ,13.6 + ,1093 + ,380 + ,0.9 + ,3506 + ,294 + ,15005 + ,9.2 + ,925 + ,384 + ,1 + ,3810 + ,5020 + ,14806 + ,6.5 + ,750 + ,346 + ,1.1 + ,2692 + ,1141 + ,15019 + ,7.1 + ,1038 + ,389 + ,1.4 + ,3073 + ,3805 + ,13909 + ,6 + ,679 + ,407 + ,1.5 + ,3713 + ,2127 + ,15211 + ,8 + ,848 + ,393 + ,1.8 + ,4555 + ,2531 + ,14385 + ,13.1 + ,300 + ,346 + ,1.8 + ,7807 + ,3682 + ,15144 + ,14.1 + ,1379 + ,348 + ,1.8 + ,10869 + ,3263 + ,14659 + ,17.5 + ,901 + ,353 + ,1.7 + ,9682 + ,2798 + ,15989 + ,17 + ,1606 + ,364 + ,1.5 + ,7704 + ,5936 + ,16262 + ,17.1 + ,422 + ,305 + ,1.1 + ,9826 + ,10568 + ,16021 + ,13.8 + ,968 + ,307 + ,1.3 + ,5456 + ,5296 + ,15662 + ,10.1 + ,319 + ,312 + ,1.6 + ,3677 + ,1870 + ,14531 + ,6.9 + ,583 + ,312 + ,1.9 + ,3431 + ,4390 + ,14544 + ,2.4 + ,765 + ,286 + ,1.9 + ,2765 + ,3707 + ,15071 + ,6.5 + ,963 + ,324 + ,2 + ,3483 + ,5201 + ,14236 + ,5.1 + ,392 + ,336 + ,2.2 + ,3445 + ,3748 + ,14771 + ,5.9 + ,919 + ,327 + ,2.2 + ,6081 + ,5282 + ,14804 + ,8.9 + ,339 + ,302 + ,2 + ,8767 + ,5349 + ,15597 + ,15.7 + ,327 + ,299 + ,2.3 + ,9407 + ,6249 + ,15418 + ,16.5 + ,397 + ,311 + ,2.6 + ,6551 + ,5517 + ,16903 + ,18.1 + ,1268 + ,315 + ,3.2 + ,12480 + ,8640 + ,16350 + ,17.4 + ,1137 + ,264 + ,3.2 + ,9530 + ,15767 + ,16393 + ,13.6 + ,1000 + ,278 + ,3.1 + ,5960 + ,8850 + ,15685 + ,10.1 + ,915 + ,278 + ,2.8 + ,3252 + ,5582 + ,14556 + ,6.9 + ,905 + ,287 + ,2.3 + ,3717 + ,6496 + ,14850 + ,2.4 + ,243 + ,279 + ,1.9 + ,2642 + ,3255 + ,15391 + ,0.8 + ,537 + ,324 + ,1.9 + ,2989 + ,6189 + ,13704 + ,3.3 + ,551 + ,354 + ,2 + ,3607 + ,6452 + ,15409 + ,6.3 + ,482 + ,354 + ,2 + ,5366 + ,5099 + ,15098 + ,12.2 + ,199 + ,360 + ,1.8 + ,8898 + ,6833 + ,15254 + ,13.9 + ,650 + ,363 + ,1.6 + ,9435 + ,7046 + ,15522 + ,15.6 + ,533 + ,385 + ,1.4 + ,7328 + ,7739 + ,16669 + ,18.1 + ,1071 + ,412 + ,0.2 + ,8594 + ,10142 + ,16238 + ,18.5 + ,469 + ,370 + ,0.3 + ,11349 + ,16054 + ,16246 + ,15 + ,335 + ,389 + ,0.4 + ,5797 + ,7721 + ,15424 + ,10.7 + ,598 + ,395 + ,0.7 + ,3621 + ,6182 + ,14952 + ,9.5 + ,1200 + ,417 + ,1 + ,3851 + ,6490 + ,15008 + ,2.2 + ,844 + ,404 + ,1.1) + ,dim=c(7 + ,84) + ,dimnames=list(c('Huwelijken' + ,'Bevolkingsgroei' + ,'Geborenen' + ,'Temperatuur' + ,'Neerslag' + ,'Werkloosheid' + ,'Inflatie') + ,1:84)) > y <- array(NA,dim=c(7,84),dimnames=list(c('Huwelijken','Bevolkingsgroei','Geborenen','Temperatuur','Neerslag','Werkloosheid','Inflatie'),1:84)) > 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 = '2' > par2 = 'quantiles' > par1 = '1' > #'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 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] "Huwelijken" > x[,par1] [1] 3111 3995 5245 5588 10681 10516 7496 9935 10249 6271 3616 3724 [13] 2886 3318 4166 6401 9209 9820 7470 8207 9564 5309 3385 3706 [25] 2733 3045 3449 5542 10072 9418 7516 7840 10081 4956 3641 3970 [37] 2931 3170 3889 4850 8037 12370 6712 7297 10613 5184 3506 3810 [49] 2692 3073 3713 4555 7807 10869 9682 7704 9826 5456 3677 3431 [61] 2765 3483 3445 6081 8767 9407 6551 12480 9530 5960 3252 3717 [73] 2642 2989 3607 5366 8898 9435 7328 8594 11349 5797 3621 3851 > 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]) [2642, 5542) [5542,12480] 42 42 > colnames(x) [1] "Huwelijken" "Bevolkingsgroei" "Geborenen" "Temperatuur" [5] "Neerslag" "Werkloosheid" "Inflatie" > colnames(x)[par1] [1] "Huwelijken" > x[,par1] [1] [2642, 5542) [2642, 5542) [2642, 5542) [5542,12480] [5542,12480] [6] [5542,12480] [5542,12480] [5542,12480] [5542,12480] [5542,12480] [11] [2642, 5542) [2642, 5542) [2642, 5542) [2642, 5542) [2642, 5542) [16] [5542,12480] [5542,12480] [5542,12480] [5542,12480] [5542,12480] [21] [5542,12480] [2642, 5542) [2642, 5542) [2642, 5542) [2642, 5542) [26] [2642, 5542) [2642, 5542) [5542,12480] [5542,12480] [5542,12480] [31] [5542,12480] [5542,12480] [5542,12480] [2642, 5542) [2642, 5542) [36] [2642, 5542) [2642, 5542) [2642, 5542) [2642, 5542) [2642, 5542) [41] [5542,12480] [5542,12480] [5542,12480] [5542,12480] [5542,12480] [46] [2642, 5542) [2642, 5542) [2642, 5542) [2642, 5542) [2642, 5542) [51] [2642, 5542) [2642, 5542) [5542,12480] [5542,12480] [5542,12480] [56] [5542,12480] [5542,12480] [2642, 5542) [2642, 5542) [2642, 5542) [61] [2642, 5542) [2642, 5542) [2642, 5542) [5542,12480] [5542,12480] [66] [5542,12480] [5542,12480] [5542,12480] [5542,12480] [5542,12480] [71] [2642, 5542) [2642, 5542) [2642, 5542) [2642, 5542) [2642, 5542) [76] [2642, 5542) [5542,12480] [5542,12480] [5542,12480] [5542,12480] [81] [5542,12480] [5542,12480] [2642, 5542) [2642, 5542) Levels: [2642, 5542) [5542,12480] > 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/1hin51292700257.tab") + } + } > m Conditional inference tree with 2 terminal nodes Response: as.factor(Huwelijken) Inputs: Bevolkingsgroei, Geborenen, Temperatuur, Neerslag, Werkloosheid, Inflatie Number of observations: 84 1) Temperatuur <= 9.5; criterion = 1, statistic = 54.783 2)* weights = 38 1) Temperatuur > 9.5 3)* weights = 46 > postscript(file="/var/www/rcomp/tmp/2sr5q1292700257.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/3sr5q1292700257.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) + } > if (par2 != 'none') { + print(cbind(as.factor(x[,par1]),predict(m))) + myt <- table(as.factor(x[,par1]),predict(m)) + print(myt) + } [,1] [,2] [1,] 1 1 [2,] 1 1 [3,] 1 1 [4,] 2 2 [5,] 2 2 [6,] 2 2 [7,] 2 2 [8,] 2 2 [9,] 2 2 [10,] 2 1 [11,] 1 1 [12,] 1 1 [13,] 1 1 [14,] 1 1 [15,] 1 1 [16,] 2 2 [17,] 2 2 [18,] 2 2 [19,] 2 2 [20,] 2 2 [21,] 2 2 [22,] 1 2 [23,] 1 1 [24,] 1 1 [25,] 1 1 [26,] 1 1 [27,] 1 1 [28,] 2 2 [29,] 2 2 [30,] 2 2 [31,] 2 2 [32,] 2 2 [33,] 2 2 [34,] 1 2 [35,] 1 1 [36,] 1 1 [37,] 1 1 [38,] 1 1 [39,] 1 1 [40,] 1 1 [41,] 2 2 [42,] 2 2 [43,] 2 2 [44,] 2 2 [45,] 2 2 [46,] 1 2 [47,] 1 1 [48,] 1 1 [49,] 1 1 [50,] 1 1 [51,] 1 1 [52,] 1 2 [53,] 2 2 [54,] 2 2 [55,] 2 2 [56,] 2 2 [57,] 2 2 [58,] 1 2 [59,] 1 1 [60,] 1 1 [61,] 1 1 [62,] 1 1 [63,] 1 1 [64,] 2 1 [65,] 2 2 [66,] 2 2 [67,] 2 2 [68,] 2 2 [69,] 2 2 [70,] 2 2 [71,] 1 1 [72,] 1 1 [73,] 1 1 [74,] 1 1 [75,] 1 1 [76,] 1 2 [77,] 2 2 [78,] 2 2 [79,] 2 2 [80,] 2 2 [81,] 2 2 [82,] 2 2 [83,] 1 1 [84,] 1 1 [2642, 5542) [5542,12480] [2642, 5542) 36 6 [5542,12480] 2 40 > postscript(file="/var/www/rcomp/tmp/4l0mb1292700257.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/56j3h1292700257.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/6a1151292700257.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/7d2ht1292700257.tab") + } > > try(system("convert tmp/2sr5q1292700257.ps tmp/2sr5q1292700257.png",intern=TRUE)) character(0) > try(system("convert tmp/3sr5q1292700257.ps tmp/3sr5q1292700257.png",intern=TRUE)) character(0) > try(system("convert tmp/4l0mb1292700257.ps tmp/4l0mb1292700257.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.020 0.300 2.286