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(1655 + ,64 + ,96 + ,955 + ,60 + ,58 + ,1782 + ,66 + ,69 + ,2465 + ,97 + ,125 + ,1051 + ,48 + ,55 + ,577 + ,27 + ,8 + ,3978 + ,106 + ,135 + ,381 + ,19 + ,1 + ,1860 + ,53 + ,64 + ,1638 + ,41 + ,77 + ,1993 + ,101 + ,90 + ,1896 + ,104 + ,104 + ,1579 + ,64 + ,48 + ,2633 + ,73 + ,113 + ,1718 + ,77 + ,68 + ,4599 + ,170 + ,168 + ,2017 + ,65 + ,111 + ,2538 + ,140 + ,92 + ,1287 + ,51 + ,93 + ,2177 + ,78 + ,135 + ,2309 + ,67 + ,117 + ,2638 + ,99 + ,86 + ,1298 + ,37 + ,50 + ,1628 + ,52 + ,94 + ,2975 + ,109 + ,127 + ,2387 + ,110 + ,81 + ,2654 + ,123 + ,93 + ,1786 + ,79 + ,113 + ,1430 + ,50 + ,52 + ,2235 + ,56 + ,116 + ,2107 + ,71 + ,114 + ,1661 + ,70 + ,44 + ,2012 + ,82 + ,128 + ,866 + ,34 + ,38 + ,2804 + ,88 + ,117 + ,2668 + ,54 + ,83 + ,3414 + ,114 + ,102 + ,1677 + ,77 + ,74 + ,917 + ,31 + ,33 + ,2986 + ,174 + ,111 + ,3034 + ,76 + ,117 + ,1457 + ,61 + ,67 + ,1627 + ,71 + ,69 + ,1488 + ,52 + ,62 + ,2397 + ,75 + ,50 + ,4915 + ,138 + ,91 + ,918 + ,42 + ,20 + ,2086 + ,70 + ,101 + ,3779 + ,110 + ,137 + ,1988 + ,53 + ,93 + ,1653 + ,70 + ,89 + ,496 + ,24 + ,8 + ,2452 + ,297 + ,83 + ,744 + ,17 + ,21 + ,1161 + ,64 + ,30 + ,2723 + ,52 + ,86 + ,2337 + ,79 + ,116 + ,3415 + ,168 + ,115 + ,2240 + ,126 + ,139 + ,1956 + ,76 + ,77 + ,3777 + ,132 + ,147 + ,3010 + ,112 + ,126 + ,2294 + ,95 + ,57 + ,2213 + ,82 + ,67 + ,1317 + ,62 + ,47 + ,1577 + ,63 + ,91 + ,1782 + ,122 + ,79 + ,2428 + ,132 + ,75 + ,1995 + ,71 + ,114 + ,1441 + ,62 + ,127 + ,2396 + ,64 + ,91 + ,893 + ,32 + ,22 + ,2055 + ,75 + ,73 + ,1593 + ,50 + ,77 + ,1612 + ,56 + ,105 + ,2130 + ,74 + ,132 + ,2093 + ,84 + ,94 + ,1735 + ,103 + ,78 + ,2094 + ,59 + ,126 + ,1542 + ,59 + ,71 + ,1572 + ,44 + ,59 + ,3409 + ,104 + ,134 + ,1357 + ,67 + ,30 + ,2050 + ,96 + ,112 + ,870 + ,25 + ,49 + ,1737 + ,51 + ,26 + ,1139 + ,51 + ,70 + ,3402 + ,172 + ,59 + ,2311 + ,98 + ,95 + ,2996 + ,101 + ,161 + ,2176 + ,83 + ,74 + ,1857 + ,70 + ,137 + ,1571 + ,59 + ,37 + ,2914 + ,71 + ,121 + ,2204 + ,73 + ,61 + ,1521 + ,35 + ,78 + ,1526 + ,47 + ,88 + ,1911 + ,70 + ,152 + ,3688 + ,138 + ,151 + ,3373 + ,104 + ,145 + ,2314 + ,110 + ,115 + ,2142 + ,60 + ,140 + ,1955 + ,170 + ,73 + ,602 + ,14 + ,13 + ,2084 + ,73 + ,89 + ,1777 + ,123 + ,86 + ,2326 + ,45 + ,122 + ,2498 + ,85 + ,163 + ,974 + ,57 + ,28 + ,2969 + ,79 + ,116 + ,1825 + ,64 + ,76 + ,2082 + ,78 + ,134 + ,398 + ,11 + ,12 + ,1821 + ,69 + ,120 + ,530 + ,25 + ,23 + ,1551 + ,47 + ,83 + ,2747 + ,105 + ,130 + ,387 + ,16 + ,4 + ,1914 + ,47 + ,73 + ,449 + ,19 + ,18 + ,3106 + ,109 + ,98 + ,1795 + ,59 + ,68 + ,1482 + ,79 + ,55 + ,1521 + ,50 + ,37 + ,568 + ,34 + ,16 + ,1599 + ,37 + ,61 + ,2551 + ,77 + ,128 + ,1223 + ,56 + ,50 + ,3322 + ,76 + ,134 + ,2230 + ,94 + ,139 + ,3180 + ,116 + ,136 + ,1177 + ,33 + ,66 + ,1051 + ,37 + ,42 + ,2732 + ,303 + ,82 + ,3929 + ,158 + ,98 + ,1507 + ,44 + ,49 + ,3904 + ,126 + ,127 + ,1755 + ,74 + ,55 + ,1627 + ,46 + ,104 + ,2080 + ,81 + ,85 + ,1596 + ,109 + ,29 + ,3657 + ,108 + ,95 + ,2022 + ,80 + ,120 + ,2035 + ,63 + ,41 + ,2626 + ,94 + ,132 + ,1603 + ,52 + ,142 + ,2305 + ,77 + ,88 + ,2315 + ,96 + ,170 + ,2 + ,0 + ,0 + ,207 + ,10 + ,4 + ,5 + ,1 + ,0 + ,8 + ,2 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,0 + ,1819 + ,80 + ,56 + ,2964 + ,135 + ,125 + ,0 + ,0 + ,0 + ,4 + ,4 + ,0 + ,151 + ,5 + ,7 + ,474 + ,20 + ,12 + ,141 + ,5 + ,0 + ,976 + ,38 + ,37 + ,29 + ,2 + ,0 + ,1577 + ,60 + ,47) + ,dim=c(3 + ,164) + ,dimnames=list(c('Pageviews' + ,'Logins' + ,'Blogs') + ,1:164)) > y <- array(NA,dim=c(3,164),dimnames=list(c('Pageviews','Logins','Blogs'),1:164)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par4 = 'yes' > par3 = '3' > par2 = 'quantiles' > 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 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] "Logins" > x[,par1] [1] 64 60 66 97 48 27 106 19 53 41 101 104 64 73 77 170 65 140 [19] 51 78 67 99 37 52 109 110 123 79 50 56 71 70 82 34 88 54 [37] 114 77 31 174 76 61 71 52 75 138 42 70 110 53 70 24 297 17 [55] 64 52 79 168 126 76 132 112 95 82 62 63 122 132 71 62 64 32 [73] 75 50 56 74 84 103 59 59 44 104 67 96 25 51 51 172 98 101 [91] 83 70 59 71 73 35 47 70 138 104 110 60 170 14 73 123 45 85 [109] 57 79 64 78 11 69 25 47 105 16 47 19 109 59 79 50 34 37 [127] 77 56 76 94 116 33 37 303 158 44 126 74 46 81 109 108 80 63 [145] 94 52 77 96 0 10 1 2 0 0 80 135 0 4 5 20 5 38 [163] 2 60 > 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, 56) [56, 80) [80,303] 55 55 54 > colnames(x) [1] "Pageviews" "Logins" "Blogs" > colnames(x)[par1] [1] "Logins" > x[,par1] [1] [56, 80) [56, 80) [56, 80) [80,303] [ 0, 56) [ 0, 56) [80,303] [ 0, 56) [9] [ 0, 56) [ 0, 56) [80,303] [80,303] [56, 80) [56, 80) [56, 80) [80,303] [17] [56, 80) [80,303] [ 0, 56) [56, 80) [56, 80) [80,303] [ 0, 56) [ 0, 56) [25] [80,303] [80,303] [80,303] [56, 80) [ 0, 56) [56, 80) [56, 80) [56, 80) [33] [80,303] [ 0, 56) [80,303] [ 0, 56) [80,303] [56, 80) [ 0, 56) [80,303] [41] [56, 80) [56, 80) [56, 80) [ 0, 56) [56, 80) [80,303] [ 0, 56) [56, 80) [49] [80,303] [ 0, 56) [56, 80) [ 0, 56) [80,303] [ 0, 56) [56, 80) [ 0, 56) [57] [56, 80) [80,303] [80,303] [56, 80) [80,303] [80,303] [80,303] [80,303] [65] [56, 80) [56, 80) [80,303] [80,303] [56, 80) [56, 80) [56, 80) [ 0, 56) [73] [56, 80) [ 0, 56) [56, 80) [56, 80) [80,303] [80,303] [56, 80) [56, 80) [81] [ 0, 56) [80,303] [56, 80) [80,303] [ 0, 56) [ 0, 56) [ 0, 56) [80,303] [89] [80,303] [80,303] [80,303] [56, 80) [56, 80) [56, 80) [56, 80) [ 0, 56) [97] [ 0, 56) [56, 80) [80,303] [80,303] [80,303] [56, 80) [80,303] [ 0, 56) [105] [56, 80) [80,303] [ 0, 56) [80,303] [56, 80) [56, 80) [56, 80) [56, 80) [113] [ 0, 56) [56, 80) [ 0, 56) [ 0, 56) [80,303] [ 0, 56) [ 0, 56) [ 0, 56) [121] [80,303] [56, 80) [56, 80) [ 0, 56) [ 0, 56) [ 0, 56) [56, 80) [56, 80) [129] [56, 80) [80,303] [80,303] [ 0, 56) [ 0, 56) [80,303] [80,303] [ 0, 56) [137] [80,303] [56, 80) [ 0, 56) [80,303] [80,303] [80,303] [80,303] [56, 80) [145] [80,303] [ 0, 56) [56, 80) [80,303] [ 0, 56) [ 0, 56) [ 0, 56) [ 0, 56) [153] [ 0, 56) [ 0, 56) [80,303] [80,303] [ 0, 56) [ 0, 56) [ 0, 56) [ 0, 56) [161] [ 0, 56) [ 0, 56) [ 0, 56) [56, 80) Levels: [ 0, 56) [56, 80) [80,303] > 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/15d751323768496.tab") + } + } m.ct.i.pred m.ct.i.actu 1 2 3 1 419 49 20 2 128 288 79 3 6 155 327 [1] 0.8586066 [1] 0.5818182 [1] 0.670082 [1] 0.7029232 m.ct.x.pred m.ct.x.actu 1 2 3 1 44 12 6 2 19 28 8 3 2 21 29 [1] 0.7096774 [1] 0.5090909 [1] 0.5576923 [1] 0.5976331 > m Conditional inference tree with 4 terminal nodes Response: as.factor(Logins) Inputs: Pageviews, Blogs Number of observations: 164 1) Pageviews <= 1638; criterion = 1, statistic = 86.907 2) Pageviews <= 918; criterion = 0.996, statistic = 12.589 3)* weights = 27 2) Pageviews > 918 4)* weights = 38 1) Pageviews > 1638 5) Pageviews <= 2397; criterion = 1, statistic = 20.303 6)* weights = 59 5) Pageviews > 2397 7)* weights = 40 > postscript(file="/var/wessaorg/rcomp/tmp/2ef4y1323768496.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/3m5me1323768496.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,] 2 2 [2,] 2 1 [3,] 2 2 [4,] 3 3 [5,] 1 1 [6,] 1 1 [7,] 3 3 [8,] 1 1 [9,] 1 2 [10,] 1 1 [11,] 3 2 [12,] 3 2 [13,] 2 1 [14,] 2 3 [15,] 2 2 [16,] 3 3 [17,] 2 2 [18,] 3 3 [19,] 1 1 [20,] 2 2 [21,] 2 2 [22,] 3 3 [23,] 1 1 [24,] 1 1 [25,] 3 3 [26,] 3 2 [27,] 3 3 [28,] 2 2 [29,] 1 1 [30,] 2 2 [31,] 2 2 [32,] 2 2 [33,] 3 2 [34,] 1 1 [35,] 3 3 [36,] 1 3 [37,] 3 3 [38,] 2 2 [39,] 1 1 [40,] 3 3 [41,] 2 3 [42,] 2 1 [43,] 2 1 [44,] 1 1 [45,] 2 2 [46,] 3 3 [47,] 1 1 [48,] 2 2 [49,] 3 3 [50,] 1 2 [51,] 2 2 [52,] 1 1 [53,] 3 3 [54,] 1 1 [55,] 2 1 [56,] 1 3 [57,] 2 2 [58,] 3 3 [59,] 3 2 [60,] 2 2 [61,] 3 3 [62,] 3 3 [63,] 3 2 [64,] 3 2 [65,] 2 1 [66,] 2 1 [67,] 3 2 [68,] 3 3 [69,] 2 2 [70,] 2 1 [71,] 2 2 [72,] 1 1 [73,] 2 2 [74,] 1 1 [75,] 2 1 [76,] 2 2 [77,] 3 2 [78,] 3 2 [79,] 2 2 [80,] 2 1 [81,] 1 1 [82,] 3 3 [83,] 2 1 [84,] 3 2 [85,] 1 1 [86,] 1 2 [87,] 1 1 [88,] 3 3 [89,] 3 2 [90,] 3 3 [91,] 3 2 [92,] 2 2 [93,] 2 1 [94,] 2 3 [95,] 2 2 [96,] 1 1 [97,] 1 1 [98,] 2 2 [99,] 3 3 [100,] 3 3 [101,] 3 2 [102,] 2 2 [103,] 3 2 [104,] 1 1 [105,] 2 2 [106,] 3 2 [107,] 1 2 [108,] 3 3 [109,] 2 1 [110,] 2 3 [111,] 2 2 [112,] 2 2 [113,] 1 1 [114,] 2 2 [115,] 1 1 [116,] 1 1 [117,] 3 3 [118,] 1 1 [119,] 1 2 [120,] 1 1 [121,] 3 3 [122,] 2 2 [123,] 2 1 [124,] 1 1 [125,] 1 1 [126,] 1 1 [127,] 2 3 [128,] 2 1 [129,] 2 3 [130,] 3 2 [131,] 3 3 [132,] 1 1 [133,] 1 1 [134,] 3 3 [135,] 3 3 [136,] 1 1 [137,] 3 3 [138,] 2 2 [139,] 1 1 [140,] 3 2 [141,] 3 1 [142,] 3 3 [143,] 3 2 [144,] 2 2 [145,] 3 3 [146,] 1 1 [147,] 2 2 [148,] 3 2 [149,] 1 1 [150,] 1 1 [151,] 1 1 [152,] 1 1 [153,] 1 1 [154,] 1 1 [155,] 3 2 [156,] 3 3 [157,] 1 1 [158,] 1 1 [159,] 1 1 [160,] 1 1 [161,] 1 1 [162,] 1 1 [163,] 1 1 [164,] 2 1 [ 0, 56) [56, 80) [80,303] [ 0, 56) 48 5 2 [56, 80) 16 33 6 [80,303] 1 21 32 > postscript(file="/var/wessaorg/rcomp/tmp/4l5an1323768496.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/5hkkc1323768496.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/6dyra1323768496.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/755iq1323768496.tab") + } > > try(system("convert tmp/2ef4y1323768496.ps tmp/2ef4y1323768496.png",intern=TRUE)) character(0) > try(system("convert tmp/3m5me1323768496.ps tmp/3m5me1323768496.png",intern=TRUE)) character(0) > try(system("convert tmp/4l5an1323768496.ps tmp/4l5an1323768496.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.340 0.242 3.578