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(1 + ,210907 + ,56 + ,79 + ,30 + ,1 + ,120982 + ,56 + ,58 + ,28 + ,1 + ,176508 + ,54 + ,60 + ,38 + ,0 + ,179321 + ,89 + ,108 + ,30 + ,1 + ,123185 + ,40 + ,49 + ,22 + ,1 + ,52746 + ,25 + ,0 + ,26 + ,1 + ,385534 + ,92 + ,121 + ,25 + ,0 + ,33170 + ,18 + ,1 + ,18 + ,1 + ,101645 + ,63 + ,20 + ,11 + ,0 + ,149061 + ,44 + ,43 + ,26 + ,0 + ,165446 + ,33 + ,69 + ,25 + ,0 + ,237213 + ,84 + ,78 + ,38 + ,0 + ,173326 + ,88 + ,86 + ,44 + ,0 + ,133131 + ,55 + ,44 + ,30 + ,1 + ,258873 + ,60 + ,104 + ,40 + ,0 + ,180083 + ,66 + ,63 + ,34 + ,1 + ,324799 + ,154 + ,158 + ,47 + ,1 + ,230964 + ,53 + ,102 + ,30 + ,0 + ,236785 + ,119 + ,77 + ,31 + ,0 + ,135473 + ,41 + ,82 + ,23 + ,0 + ,202925 + ,61 + ,115 + ,36 + ,1 + ,215147 + ,58 + ,101 + ,36 + ,0 + ,344297 + ,75 + ,80 + ,30 + ,1 + ,153935 + ,33 + ,50 + ,25 + ,0 + ,132943 + ,40 + ,83 + ,39 + ,0 + ,174724 + ,92 + ,123 + ,34 + ,1 + ,174415 + ,100 + ,73 + ,31 + ,1 + ,225548 + ,112 + ,81 + ,31 + ,1 + ,223632 + ,73 + ,105 + ,33 + ,0 + ,124817 + ,40 + ,47 + ,25 + ,1 + ,221698 + ,45 + ,105 + ,33 + ,0 + ,210767 + ,60 + ,94 + ,35 + ,1 + ,170266 + ,62 + ,44 + ,42 + ,0 + ,260561 + ,75 + ,114 + ,43 + ,1 + ,84853 + ,31 + ,38 + ,30 + ,0 + ,294424 + ,77 + ,107 + ,33 + ,1 + ,101011 + ,34 + ,30 + ,13 + ,1 + ,215641 + ,46 + ,71 + ,32 + ,0 + ,325107 + ,99 + ,84 + ,36 + ,0 + ,7176 + ,17 + ,0 + ,0 + ,1 + ,167542 + ,66 + ,59 + ,28 + ,1 + ,106408 + ,30 + ,33 + ,14 + ,0 + ,96560 + ,76 + ,42 + ,17 + ,1 + ,265769 + ,146 + ,96 + ,32 + ,1 + ,269651 + ,67 + ,106 + ,30 + ,1 + ,149112 + ,56 + ,56 + ,35 + ,0 + ,175824 + ,107 + ,57 + ,20 + ,0 + ,152871 + ,58 + ,59 + ,28 + ,1 + ,111665 + ,34 + ,39 + ,28 + ,0 + ,116408 + ,61 + ,34 + ,39 + ,1 + ,362301 + ,119 + ,76 + ,34 + ,0 + ,78800 + ,42 + ,20 + ,26 + ,1 + ,183167 + ,66 + ,91 + ,39 + ,0 + ,277965 + ,89 + ,115 + ,39 + ,1 + ,150629 + ,44 + ,85 + ,33 + ,0 + ,168809 + ,66 + ,76 + ,28 + ,0 + ,24188 + ,24 + ,8 + ,4 + ,0 + ,329267 + ,259 + ,79 + ,39 + ,0 + ,65029 + ,17 + ,21 + ,18 + ,1 + ,101097 + ,64 + ,30 + ,14 + ,0 + ,218946 + ,41 + ,76 + ,29 + ,0 + ,244052 + ,68 + ,101 + ,44 + ,0 + ,341570 + ,168 + ,94 + ,21 + ,1 + ,103597 + ,43 + ,27 + ,16 + ,0 + ,233328 + ,132 + ,92 + ,28 + ,1 + ,256462 + ,105 + ,123 + ,35 + ,1 + ,206161 + ,71 + ,75 + ,28 + ,1 + ,311473 + ,112 + ,128 + ,38 + ,0 + ,235800 + ,94 + ,105 + ,23 + ,0 + ,177939 + ,82 + ,55 + ,36 + ,0 + ,207176 + ,70 + ,56 + ,32 + ,1 + ,196553 + ,57 + ,41 + ,29 + ,1 + ,174184 + ,53 + ,72 + ,25 + ,1 + ,143246 + ,103 + ,67 + ,27 + ,1 + ,187559 + ,121 + ,75 + ,36 + ,0 + ,187681 + ,62 + ,114 + ,28 + ,0 + ,119016 + ,52 + ,118 + ,23 + ,0 + ,182192 + ,52 + ,77 + ,40 + ,0 + ,73566 + ,32 + ,22 + ,23 + ,1 + ,194979 + ,62 + ,66 + ,40 + ,1 + ,167488 + ,45 + ,69 + ,28 + ,1 + ,143756 + ,46 + ,105 + ,34 + ,1 + ,275541 + ,63 + ,116 + ,33 + ,0 + ,243199 + ,75 + ,88 + ,28 + ,0 + ,182999 + ,88 + ,73 + ,34 + ,1 + ,135649 + ,46 + ,99 + ,30 + ,1 + ,152299 + ,53 + ,62 + ,33 + ,1 + ,120221 + ,37 + ,53 + ,22 + ,1 + ,346485 + ,90 + ,118 + ,38 + ,1 + ,145790 + ,63 + ,30 + ,26 + ,1 + ,193339 + ,78 + ,100 + ,35 + ,0 + ,80953 + ,25 + ,49 + ,8 + ,0 + ,122774 + ,45 + ,24 + ,24 + ,0 + ,130585 + ,46 + ,67 + ,29 + ,0 + ,112611 + ,41 + ,46 + ,20 + ,0 + ,286468 + ,144 + ,57 + ,29 + ,0 + ,241066 + ,82 + ,75 + ,45 + ,1 + ,148446 + ,91 + ,135 + ,37 + ,1 + ,204713 + ,71 + ,68 + ,33 + ,0 + ,182079 + ,63 + ,124 + ,33 + ,1 + ,140344 + ,53 + ,33 + ,25 + ,1 + ,220516 + ,62 + ,98 + ,32 + ,0 + ,243060 + ,63 + ,58 + ,29 + ,1 + ,162765 + ,32 + ,68 + ,28 + ,0 + ,182613 + ,39 + ,81 + ,28 + ,0 + ,232138 + ,62 + ,131 + ,31 + ,1 + ,265318 + ,117 + ,110 + ,52 + ,1 + ,85574 + ,34 + ,37 + ,21 + ,1 + ,310839 + ,92 + ,130 + ,24 + ,1 + ,225060 + ,93 + ,93 + ,41 + ,0 + ,232317 + ,54 + ,118 + ,33 + ,0 + ,144966 + ,144 + ,39 + ,32 + ,0 + ,43287 + ,14 + ,13 + ,19 + ,1 + ,155754 + ,61 + ,74 + ,20 + ,0 + ,164709 + ,109 + ,81 + ,31 + ,0 + ,201940 + ,38 + ,109 + ,31 + ,1 + ,235454 + ,73 + ,151 + ,32 + ,0 + ,220801 + ,75 + ,51 + ,18 + ,1 + ,99466 + ,50 + ,28 + ,23 + ,0 + ,92661 + ,61 + ,40 + ,17 + ,0 + ,133328 + ,55 + ,56 + ,20 + ,0 + ,61361 + ,77 + ,27 + ,12 + ,1 + ,125930 + ,75 + ,37 + ,17 + ,1 + ,100750 + ,72 + ,83 + ,30 + ,0 + ,224549 + ,50 + ,54 + ,31 + ,0 + ,82316 + ,32 + ,27 + ,10 + ,1 + ,102010 + ,53 + ,28 + ,13 + ,0 + ,101523 + ,42 + ,59 + ,22 + ,0 + ,243511 + ,71 + ,133 + ,42 + ,1 + ,22938 + ,10 + ,12 + ,1 + ,1 + ,41566 + ,35 + ,0 + ,9 + ,1 + ,152474 + ,65 + ,106 + ,32 + ,1 + ,61857 + ,25 + ,23 + ,11 + ,0 + ,99923 + ,66 + ,44 + ,25 + ,0 + ,132487 + ,41 + ,71 + ,36 + ,0 + ,317394 + ,86 + ,116 + ,31 + ,0 + ,21054 + ,16 + ,4 + ,0 + ,1 + ,209641 + ,42 + ,62 + ,24 + ,0 + ,22648 + ,19 + ,12 + ,13 + ,1 + ,31414 + ,19 + ,18 + ,8 + ,1 + ,46698 + ,45 + ,14 + ,13 + ,0 + ,131698 + ,65 + ,60 + ,19 + ,1 + ,91735 + ,35 + ,7 + ,18 + ,1 + ,244749 + ,95 + ,98 + ,33 + ,1 + ,184510 + ,49 + ,64 + ,40 + ,1 + ,79863 + ,37 + ,29 + ,22 + ,1 + ,128423 + ,64 + ,32 + ,38 + ,0 + ,97839 + ,38 + ,25 + ,24 + ,0 + ,38214 + ,34 + ,16 + ,8 + ,0 + ,151101 + ,32 + ,48 + ,35 + ,1 + ,272458 + ,65 + ,100 + ,43 + ,1 + ,172494 + ,52 + ,46 + ,43 + ,1 + ,108043 + ,62 + ,45 + ,14 + ,1 + ,328107 + ,65 + ,129 + ,41 + ,0 + ,250579 + ,83 + ,130 + ,38 + ,1 + ,351067 + ,95 + ,136 + ,45 + ,0 + ,158015 + ,29 + ,59 + ,31 + ,1 + ,98866 + ,18 + ,25 + ,13 + ,1 + ,85439 + ,33 + ,32 + ,28 + ,1 + ,229242 + ,247 + ,63 + ,31 + ,1 + ,351619 + ,139 + ,95 + ,40 + ,1 + ,84207 + ,29 + ,14 + ,30 + ,1 + ,120445 + ,118 + ,36 + ,16 + ,1 + ,324598 + ,110 + ,113 + ,37 + ,0 + ,131069 + ,67 + ,47 + ,30 + ,1 + ,204271 + ,42 + ,92 + ,35 + ,0 + ,165543 + ,65 + ,70 + ,32 + ,0 + ,141722 + ,94 + ,19 + ,27 + ,0 + ,116048 + ,64 + ,50 + ,20 + ,1 + ,250047 + ,81 + ,41 + ,18 + ,0 + ,299775 + ,95 + ,91 + ,31 + ,1 + ,195838 + ,67 + ,111 + ,31 + ,1 + ,173260 + ,63 + ,41 + ,21 + ,1 + ,254488 + ,83 + ,120 + ,39 + ,0 + ,104389 + ,45 + ,135 + ,41 + ,1 + ,136084 + ,30 + ,27 + ,13 + ,1 + ,199476 + ,70 + ,87 + ,32 + ,0 + ,92499 + ,32 + ,25 + ,18 + ,0 + ,224330 + ,83 + ,131 + ,39 + ,1 + ,135781 + ,31 + ,45 + ,14 + ,1 + ,74408 + ,67 + ,29 + ,7 + ,1 + ,81240 + ,66 + ,58 + ,17 + ,0 + ,14688 + ,10 + ,4 + ,0 + ,1 + ,181633 + ,70 + ,47 + ,30 + ,1 + ,271856 + ,103 + ,109 + ,37 + ,1 + ,7199 + ,5 + ,7 + ,0 + ,1 + ,46660 + ,20 + ,12 + ,5 + ,0 + ,17547 + ,5 + ,0 + ,1 + ,1 + ,133368 + ,36 + ,37 + ,16 + ,0 + ,95227 + ,34 + ,37 + ,32 + ,0 + ,152601 + ,48 + ,46 + ,24 + ,0 + ,98146 + ,40 + ,15 + ,17 + ,0 + ,79619 + ,43 + ,42 + ,11 + ,1 + ,59194 + ,31 + ,7 + ,24 + ,1 + ,139942 + ,42 + ,54 + ,22 + ,1 + ,118612 + ,46 + ,54 + ,12 + ,1 + ,72880 + ,33 + ,14 + ,19 + ,0 + ,65475 + ,18 + ,16 + ,13 + ,0 + ,99643 + ,55 + ,33 + ,17 + ,0 + ,71965 + ,35 + ,32 + ,15 + ,0 + ,77272 + ,59 + ,21 + ,16 + ,1 + ,49289 + ,19 + ,15 + ,24 + ,1 + ,135131 + ,66 + ,38 + ,15 + ,0 + ,108446 + ,60 + ,22 + ,17 + ,1 + ,89746 + ,36 + ,28 + ,18 + ,1 + ,44296 + ,25 + ,10 + ,20 + ,0 + ,77648 + ,47 + ,31 + ,16 + ,1 + ,181528 + ,54 + ,32 + ,16 + ,0 + ,134019 + ,53 + ,32 + ,18 + ,1 + ,124064 + ,40 + ,43 + ,22 + ,1 + ,92630 + ,40 + ,27 + ,8 + ,0 + ,121848 + ,39 + ,37 + ,17 + ,1 + ,52915 + ,14 + ,20 + ,18 + ,1 + ,81872 + ,45 + ,32 + ,16 + ,0 + ,58981 + ,36 + ,0 + ,23 + ,1 + ,53515 + ,28 + ,5 + ,22 + ,0 + ,60812 + ,44 + ,26 + ,13 + ,1 + ,56375 + ,30 + ,10 + ,13 + ,1 + ,65490 + ,22 + ,27 + ,16 + ,0 + ,80949 + ,17 + ,11 + ,16 + ,1 + ,76302 + ,31 + ,29 + ,20 + ,0 + ,104011 + ,55 + ,25 + ,22 + ,1 + ,98104 + ,54 + ,55 + ,17 + ,1 + ,67989 + ,21 + ,23 + ,18 + ,0 + ,30989 + ,14 + ,5 + ,17 + ,1 + ,135458 + ,81 + ,43 + ,12 + ,1 + ,73504 + ,35 + ,23 + ,7 + ,0 + ,63123 + ,43 + ,34 + ,17 + ,1 + ,61254 + ,46 + ,36 + ,14 + ,1 + ,74914 + ,30 + ,35 + ,23 + ,1 + ,31774 + ,23 + ,0 + ,17 + ,1 + ,81437 + ,38 + ,37 + ,14 + ,1 + ,87186 + ,54 + ,28 + ,15 + ,0 + ,50090 + ,20 + ,16 + ,17 + ,0 + ,65745 + ,53 + ,26 + ,21 + ,0 + ,56653 + ,45 + ,38 + ,18 + ,0 + ,158399 + ,39 + ,23 + ,18 + ,1 + ,46455 + ,20 + ,22 + ,17 + ,1 + ,73624 + ,24 + ,30 + ,17 + ,1 + ,38395 + ,31 + ,16 + ,16 + ,0 + ,91899 + ,35 + ,18 + ,15 + ,1 + ,139526 + ,151 + ,28 + ,21 + ,0 + ,52164 + ,52 + ,32 + ,16 + ,1 + ,51567 + ,30 + ,21 + ,14 + ,0 + ,70551 + ,31 + ,23 + ,15 + ,0 + ,84856 + ,29 + ,29 + ,17 + ,1 + ,102538 + ,57 + ,50 + ,15 + ,1 + ,86678 + ,40 + ,12 + ,15 + ,0 + ,85709 + ,44 + ,21 + ,10 + ,1 + ,34662 + ,25 + ,18 + ,6 + ,0 + ,150580 + ,77 + ,27 + ,22 + ,0 + ,99611 + ,35 + ,41 + ,21 + ,0 + ,19349 + ,11 + ,13 + ,1 + ,1 + ,99373 + ,63 + ,12 + ,18 + ,0 + ,86230 + ,44 + ,21 + ,17 + ,0 + ,30837 + ,19 + ,8 + ,4 + ,0 + ,31706 + ,13 + ,26 + ,10 + ,0 + ,89806 + ,42 + ,27 + ,16 + ,0 + ,62088 + ,38 + ,13 + ,16 + ,1 + ,40151 + ,29 + ,16 + ,9 + ,0 + ,27634 + ,20 + ,2 + ,16 + ,0 + ,76990 + ,27 + ,42 + ,17 + ,0 + ,37460 + ,20 + ,5 + ,7 + ,0 + ,54157 + ,19 + ,37 + ,15 + ,0 + ,49862 + ,37 + ,17 + ,14 + ,1 + ,84337 + ,26 + ,38 + ,14 + ,0 + ,64175 + ,42 + ,37 + ,18 + ,1 + ,59382 + ,49 + ,29 + ,12 + ,1 + ,119308 + ,30 + ,32 + ,16 + ,1 + ,76702 + ,49 + ,35 + ,21 + ,0 + ,103425 + ,67 + ,17 + ,19 + ,0 + ,70344 + ,28 + ,20 + ,16 + ,0 + ,43410 + ,19 + ,7 + ,1 + ,0 + ,104838 + ,49 + ,46 + ,16 + ,1 + ,62215 + ,27 + ,24 + ,10 + ,0 + ,69304 + ,30 + ,40 + ,19 + ,1 + ,53117 + ,22 + ,3 + ,12 + ,0 + ,19764 + ,12 + ,10 + ,2 + ,0 + ,86680 + ,31 + ,37 + ,14 + ,0 + ,84105 + ,20 + ,17 + ,17 + ,0 + ,77945 + ,20 + ,28 + ,19 + ,1 + ,89113 + ,39 + ,19 + ,14 + ,0 + ,91005 + ,29 + ,29 + ,11 + ,0 + ,40248 + ,16 + ,8 + ,4 + ,0 + ,64187 + ,27 + ,10 + ,16 + ,0 + ,50857 + ,21 + ,15 + ,20 + ,1 + ,56613 + ,19 + ,15 + ,12 + ,1 + ,62792 + ,35 + ,28 + ,15 + ,0 + ,72535 + ,14 + ,17 + ,16) + ,dim=c(5 + ,289) + ,dimnames=list(c('Geslacht' + ,'Time_in_RFC' + ,'Logins' + ,'Blogged_computations' + ,'Reviewed_compendiums') + ,1:289)) > y <- array(NA,dim=c(5,289),dimnames=list(c('Geslacht','Time_in_RFC','Logins','Blogged_computations','Reviewed_compendiums'),1:289)) > 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] "Time_in_RFC" > x[,par1] [1] 210907 120982 176508 179321 123185 52746 385534 33170 101645 149061 [11] 165446 237213 173326 133131 258873 180083 324799 230964 236785 135473 [21] 202925 215147 344297 153935 132943 174724 174415 225548 223632 124817 [31] 221698 210767 170266 260561 84853 294424 101011 215641 325107 7176 [41] 167542 106408 96560 265769 269651 149112 175824 152871 111665 116408 [51] 362301 78800 183167 277965 150629 168809 24188 329267 65029 101097 [61] 218946 244052 341570 103597 233328 256462 206161 311473 235800 177939 [71] 207176 196553 174184 143246 187559 187681 119016 182192 73566 194979 [81] 167488 143756 275541 243199 182999 135649 152299 120221 346485 145790 [91] 193339 80953 122774 130585 112611 286468 241066 148446 204713 182079 [101] 140344 220516 243060 162765 182613 232138 265318 85574 310839 225060 [111] 232317 144966 43287 155754 164709 201940 235454 220801 99466 92661 [121] 133328 61361 125930 100750 224549 82316 102010 101523 243511 22938 [131] 41566 152474 61857 99923 132487 317394 21054 209641 22648 31414 [141] 46698 131698 91735 244749 184510 79863 128423 97839 38214 151101 [151] 272458 172494 108043 328107 250579 351067 158015 98866 85439 229242 [161] 351619 84207 120445 324598 131069 204271 165543 141722 116048 250047 [171] 299775 195838 173260 254488 104389 136084 199476 92499 224330 135781 [181] 74408 81240 14688 181633 271856 7199 46660 17547 133368 95227 [191] 152601 98146 79619 59194 139942 118612 72880 65475 99643 71965 [201] 77272 49289 135131 108446 89746 44296 77648 181528 134019 124064 [211] 92630 121848 52915 81872 58981 53515 60812 56375 65490 80949 [221] 76302 104011 98104 67989 30989 135458 73504 63123 61254 74914 [231] 31774 81437 87186 50090 65745 56653 158399 46455 73624 38395 [241] 91899 139526 52164 51567 70551 84856 102538 86678 85709 34662 [251] 150580 99611 19349 99373 86230 30837 31706 89806 62088 40151 [261] 27634 76990 37460 54157 49862 84337 64175 59382 119308 76702 [271] 103425 70344 43410 104838 62215 69304 53117 19764 86680 84105 [281] 77945 89113 91005 40248 64187 50857 56613 62792 72535 > 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]) 7176 7199 14688 17547 19349 19764 21054 22648 22938 24188 27634 1 1 1 1 1 1 1 1 1 1 1 30837 30989 31414 31706 31774 33170 34662 37460 38214 38395 40151 1 1 1 1 1 1 1 1 1 1 1 40248 41566 43287 43410 44296 46455 46660 46698 49289 49862 50090 1 1 1 1 1 1 1 1 1 1 1 50857 51567 52164 52746 52915 53117 53515 54157 56375 56613 56653 1 1 1 1 1 1 1 1 1 1 1 58981 59194 59382 60812 61254 61361 61857 62088 62215 62792 63123 1 1 1 1 1 1 1 1 1 1 1 64175 64187 65029 65475 65490 65745 67989 69304 70344 70551 71965 1 1 1 1 1 1 1 1 1 1 1 72535 72880 73504 73566 73624 74408 74914 76302 76702 76990 77272 1 1 1 1 1 1 1 1 1 1 1 77648 77945 78800 79619 79863 80949 80953 81240 81437 81872 82316 1 1 1 1 1 1 1 1 1 1 1 84105 84207 84337 84853 84856 85439 85574 85709 86230 86678 86680 1 1 1 1 1 1 1 1 1 1 1 87186 89113 89746 89806 91005 91735 91899 92499 92630 92661 95227 1 1 1 1 1 1 1 1 1 1 1 96560 97839 98104 98146 98866 99373 99466 99611 99643 99923 100750 1 1 1 1 1 1 1 1 1 1 1 101011 101097 101523 101645 102010 102538 103425 103597 104011 104389 104838 1 1 1 1 1 1 1 1 1 1 1 106408 108043 108446 111665 112611 116048 116408 118612 119016 119308 120221 1 1 1 1 1 1 1 1 1 1 1 120445 120982 121848 122774 123185 124064 124817 125930 128423 130585 131069 1 1 1 1 1 1 1 1 1 1 1 131698 132487 132943 133131 133328 133368 134019 135131 135458 135473 135649 1 1 1 1 1 1 1 1 1 1 1 135781 136084 139526 139942 140344 141722 143246 143756 144966 145790 148446 1 1 1 1 1 1 1 1 1 1 1 149061 149112 150580 150629 151101 152299 152474 152601 152871 153935 155754 1 1 1 1 1 1 1 1 1 1 1 158015 158399 162765 164709 165446 165543 167488 167542 168809 170266 172494 1 1 1 1 1 1 1 1 1 1 1 173260 173326 174184 174415 174724 175824 176508 177939 179321 180083 181528 1 1 1 1 1 1 1 1 1 1 1 181633 182079 182192 182613 182999 183167 184510 187559 187681 193339 194979 1 1 1 1 1 1 1 1 1 1 1 195838 196553 199476 201940 202925 204271 204713 206161 207176 209641 210767 1 1 1 1 1 1 1 1 1 1 1 210907 215147 215641 218946 220516 220801 221698 223632 224330 224549 225060 1 1 1 1 1 1 1 1 1 1 1 225548 229242 230964 232138 232317 233328 235454 235800 236785 237213 241066 1 1 1 1 1 1 1 1 1 1 1 243060 243199 243511 244052 244749 250047 250579 254488 256462 258873 260561 1 1 1 1 1 1 1 1 1 1 1 265318 265769 269651 271856 272458 275541 277965 286468 294424 299775 310839 1 1 1 1 1 1 1 1 1 1 1 311473 317394 324598 324799 325107 328107 329267 341570 344297 346485 351067 1 1 1 1 1 1 1 1 1 1 1 351619 362301 385534 1 1 1 > colnames(x) [1] "Geslacht" "Time_in_RFC" "Logins" [4] "Blogged_computations" "Reviewed_compendiums" > colnames(x)[par1] [1] "Time_in_RFC" > x[,par1] [1] 210907 120982 176508 179321 123185 52746 385534 33170 101645 149061 [11] 165446 237213 173326 133131 258873 180083 324799 230964 236785 135473 [21] 202925 215147 344297 153935 132943 174724 174415 225548 223632 124817 [31] 221698 210767 170266 260561 84853 294424 101011 215641 325107 7176 [41] 167542 106408 96560 265769 269651 149112 175824 152871 111665 116408 [51] 362301 78800 183167 277965 150629 168809 24188 329267 65029 101097 [61] 218946 244052 341570 103597 233328 256462 206161 311473 235800 177939 [71] 207176 196553 174184 143246 187559 187681 119016 182192 73566 194979 [81] 167488 143756 275541 243199 182999 135649 152299 120221 346485 145790 [91] 193339 80953 122774 130585 112611 286468 241066 148446 204713 182079 [101] 140344 220516 243060 162765 182613 232138 265318 85574 310839 225060 [111] 232317 144966 43287 155754 164709 201940 235454 220801 99466 92661 [121] 133328 61361 125930 100750 224549 82316 102010 101523 243511 22938 [131] 41566 152474 61857 99923 132487 317394 21054 209641 22648 31414 [141] 46698 131698 91735 244749 184510 79863 128423 97839 38214 151101 [151] 272458 172494 108043 328107 250579 351067 158015 98866 85439 229242 [161] 351619 84207 120445 324598 131069 204271 165543 141722 116048 250047 [171] 299775 195838 173260 254488 104389 136084 199476 92499 224330 135781 [181] 74408 81240 14688 181633 271856 7199 46660 17547 133368 95227 [191] 152601 98146 79619 59194 139942 118612 72880 65475 99643 71965 [201] 77272 49289 135131 108446 89746 44296 77648 181528 134019 124064 [211] 92630 121848 52915 81872 58981 53515 60812 56375 65490 80949 [221] 76302 104011 98104 67989 30989 135458 73504 63123 61254 74914 [231] 31774 81437 87186 50090 65745 56653 158399 46455 73624 38395 [241] 91899 139526 52164 51567 70551 84856 102538 86678 85709 34662 [251] 150580 99611 19349 99373 86230 30837 31706 89806 62088 40151 [261] 27634 76990 37460 54157 49862 84337 64175 59382 119308 76702 [271] 103425 70344 43410 104838 62215 69304 53117 19764 86680 84105 [281] 77945 89113 91005 40248 64187 50857 56613 62792 72535 > 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/1bp3x1324668256.tab") + } + } > m Conditional inference tree with 11 terminal nodes Response: Time_in_RFC Inputs: Geslacht, Logins, Blogged_computations, Reviewed_compendiums Number of observations: 289 1) Blogged_computations <= 50; criterion = 1, statistic = 198.82 2) Blogged_computations <= 18; criterion = 1, statistic = 79.237 3) Logins <= 25; criterion = 1, statistic = 24.384 4) Reviewed_compendiums <= 4; criterion = 0.998, statistic = 12.325 5)* weights = 12 4) Reviewed_compendiums > 4 6)* weights = 21 3) Logins > 25 7)* weights = 20 2) Blogged_computations > 18 8) Reviewed_compendiums <= 23; criterion = 1, statistic = 26.563 9) Logins <= 53; criterion = 1, statistic = 20.743 10) Blogged_computations <= 40; criterion = 0.951, statistic = 6.229 11)* weights = 59 10) Blogged_computations > 40 12)* weights = 9 9) Logins > 53 13)* weights = 23 8) Reviewed_compendiums > 23 14)* weights = 25 1) Blogged_computations > 50 15) Logins <= 72; criterion = 1, statistic = 33.05 16) Reviewed_compendiums <= 23; criterion = 1, statistic = 19.342 17)* weights = 11 16) Reviewed_compendiums > 23 18) Blogged_computations <= 99; criterion = 0.982, statistic = 8.035 19)* weights = 38 18) Blogged_computations > 99 20)* weights = 20 15) Logins > 72 21)* weights = 51 > postscript(file="/var/www/rcomp/tmp/2pzbl1324668256.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/3a2jv1324668256.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 210907 177578.29 33328.7105 2 120982 177578.29 -56596.2895 3 176508 177578.29 -1070.2895 4 179321 255726.84 -76405.8431 5 123185 104183.56 19001.4444 6 52746 47608.10 5137.9048 7 385534 255726.84 129807.1569 8 33170 47608.10 -14438.0952 9 101645 119253.22 -17608.2174 10 149061 132433.36 16627.6400 11 165446 177578.29 -12132.2895 12 237213 255726.84 -18513.8431 13 173326 255726.84 -82400.8431 14 133131 132433.36 697.6400 15 258873 219776.95 39096.0500 16 180083 177578.29 2504.7105 17 324799 255726.84 69072.1569 18 230964 219776.95 11187.0500 19 236785 255726.84 -18941.8431 20 135473 121355.55 14117.4545 21 202925 219776.95 -16851.9500 22 215147 219776.95 -4629.9500 23 344297 255726.84 88570.1569 24 153935 132433.36 21501.6400 25 132943 177578.29 -44635.2895 26 174724 255726.84 -81002.8431 27 174415 255726.84 -81311.8431 28 225548 255726.84 -30178.8431 29 223632 255726.84 -32094.8431 30 124817 132433.36 -7616.3600 31 221698 219776.95 1921.0500 32 210767 177578.29 33188.7105 33 170266 132433.36 37832.6400 34 260561 255726.84 4834.1569 35 84853 132433.36 -47580.3600 36 294424 255726.84 38697.1569 37 101011 81184.85 19826.1525 38 215641 177578.29 38062.7105 39 325107 255726.84 69380.1569 40 7176 22366.50 -15190.5000 41 167542 177578.29 -10036.2895 42 106408 81184.85 25223.1525 43 96560 119253.22 -22693.2174 44 265769 255726.84 10042.1569 45 269651 219776.95 49874.0500 46 149112 177578.29 -28466.2895 47 175824 255726.84 -79902.8431 48 152871 177578.29 -24707.2895 49 111665 132433.36 -20768.3600 50 116408 132433.36 -16025.3600 51 362301 255726.84 106574.1569 52 78800 132433.36 -53633.3600 53 183167 177578.29 5588.7105 54 277965 255726.84 22238.1569 55 150629 177578.29 -26949.2895 56 168809 177578.29 -8769.2895 57 24188 22366.50 1821.5000 58 329267 255726.84 73540.1569 59 65029 81184.85 -16155.8475 60 101097 119253.22 -18156.2174 61 218946 177578.29 41367.7105 62 244052 219776.95 24275.0500 63 341570 255726.84 85843.1569 64 103597 81184.85 22412.1525 65 233328 255726.84 -22398.8431 66 256462 255726.84 735.1569 67 206161 177578.29 28582.7105 68 311473 255726.84 55746.1569 69 235800 255726.84 -19926.8431 70 177939 255726.84 -77787.8431 71 207176 177578.29 29597.7105 72 196553 132433.36 64119.6400 73 174184 177578.29 -3394.2895 74 143246 255726.84 -112480.8431 75 187559 255726.84 -68167.8431 76 187681 219776.95 -32095.9500 77 119016 121355.55 -2339.5455 78 182192 177578.29 4613.7105 79 73566 81184.85 -7618.8475 80 194979 177578.29 17400.7105 81 167488 177578.29 -10090.2895 82 143756 219776.95 -76020.9500 83 275541 219776.95 55764.0500 84 243199 255726.84 -12527.8431 85 182999 255726.84 -72727.8431 86 135649 177578.29 -41929.2895 87 152299 177578.29 -25279.2895 88 120221 121355.55 -1134.5455 89 346485 255726.84 90758.1569 90 145790 132433.36 13356.6400 91 193339 255726.84 -62387.8431 92 80953 104183.56 -23230.5556 93 122774 132433.36 -9659.3600 94 130585 177578.29 -46993.2895 95 112611 104183.56 8427.4444 96 286468 255726.84 30741.1569 97 241066 255726.84 -14660.8431 98 148446 255726.84 -107280.8431 99 204713 177578.29 27134.7105 100 182079 219776.95 -37697.9500 101 140344 132433.36 7910.6400 102 220516 177578.29 42937.7105 103 243060 177578.29 65481.7105 104 162765 177578.29 -14813.2895 105 182613 177578.29 5034.7105 106 232138 219776.95 12361.0500 107 265318 255726.84 9591.1569 108 85574 81184.85 4389.1525 109 310839 255726.84 55112.1569 110 225060 255726.84 -30666.8431 111 232317 219776.95 12540.0500 112 144966 132433.36 12532.6400 113 43287 47608.10 -4321.0952 114 155754 121355.55 34398.4545 115 164709 255726.84 -91017.8431 116 201940 219776.95 -17836.9500 117 235454 255726.84 -20272.8431 118 220801 255726.84 -34925.8431 119 99466 81184.85 18281.1525 120 92661 119253.22 -26592.2174 121 133328 121355.55 11972.4545 122 61361 119253.22 -57892.2174 123 125930 119253.22 6676.7826 124 100750 177578.29 -76828.2895 125 224549 177578.29 46970.7105 126 82316 81184.85 1131.1525 127 102010 81184.85 20825.1525 128 101523 121355.55 -19832.5455 129 243511 219776.95 23734.0500 130 22938 22366.50 571.5000 131 41566 66878.45 -25312.4500 132 152474 219776.95 -67302.9500 133 61857 81184.85 -19327.8475 134 99923 132433.36 -32510.3600 135 132487 177578.29 -45091.2895 136 317394 255726.84 61667.1569 137 21054 22366.50 -1312.5000 138 209641 177578.29 32062.7105 139 22648 47608.10 -24960.0952 140 31414 47608.10 -16194.0952 141 46698 66878.45 -20180.4500 142 131698 121355.55 10342.4545 143 91735 66878.45 24856.5500 144 244749 255726.84 -10977.8431 145 184510 177578.29 6931.7105 146 79863 81184.85 -1321.8475 147 128423 132433.36 -4010.3600 148 97839 132433.36 -34594.3600 149 38214 66878.45 -28664.4500 150 151101 132433.36 18667.6400 151 272458 219776.95 52681.0500 152 172494 132433.36 40060.6400 153 108043 119253.22 -11210.2174 154 328107 219776.95 108330.0500 155 250579 255726.84 -5147.8431 156 351067 255726.84 95340.1569 157 158015 177578.29 -19563.2895 158 98866 81184.85 17681.1525 159 85439 132433.36 -46994.3600 160 229242 255726.84 -26484.8431 161 351619 255726.84 95892.1569 162 84207 66878.45 17328.5500 163 120445 119253.22 1191.7826 164 324598 255726.84 68871.1569 165 131069 132433.36 -1364.3600 166 204271 177578.29 26692.7105 167 165543 177578.29 -12035.2895 168 141722 132433.36 9288.6400 169 116048 119253.22 -3205.2174 170 250047 119253.22 130793.7826 171 299775 255726.84 44048.1569 172 195838 219776.95 -23938.9500 173 173260 119253.22 54006.7826 174 254488 255726.84 -1238.8431 175 104389 219776.95 -115387.9500 176 136084 81184.85 54899.1525 177 199476 177578.29 21897.7105 178 92499 81184.85 11314.1525 179 224330 255726.84 -31396.8431 180 135781 104183.56 31597.4444 181 74408 119253.22 -44845.2174 182 81240 121355.55 -40115.5455 183 14688 22366.50 -7678.5000 184 181633 132433.36 49199.6400 185 271856 255726.84 16129.1569 186 7199 22366.50 -15167.5000 187 46660 47608.10 -948.0952 188 17547 22366.50 -4819.5000 189 133368 81184.85 52183.1525 190 95227 132433.36 -37206.3600 191 152601 132433.36 20167.6400 192 98146 66878.45 31267.5500 193 79619 104183.56 -24564.5556 194 59194 66878.45 -7684.4500 195 139942 121355.55 18586.4545 196 118612 121355.55 -2743.5455 197 72880 66878.45 6001.5500 198 65475 47608.10 17866.9048 199 99643 119253.22 -19610.2174 200 71965 81184.85 -9219.8475 201 77272 119253.22 -41981.2174 202 49289 47608.10 1680.9048 203 135131 119253.22 15877.7826 204 108446 119253.22 -10807.2174 205 89746 81184.85 8561.1525 206 44296 47608.10 -3312.0952 207 77648 81184.85 -3536.8475 208 181528 119253.22 62274.7826 209 134019 81184.85 52834.1525 210 124064 104183.56 19880.4444 211 92630 81184.85 11445.1525 212 121848 81184.85 40663.1525 213 52915 81184.85 -28269.8475 214 81872 81184.85 687.1525 215 58981 66878.45 -7897.4500 216 53515 66878.45 -13363.4500 217 60812 81184.85 -20372.8475 218 56375 66878.45 -10503.4500 219 65490 81184.85 -15694.8475 220 80949 47608.10 33340.9048 221 76302 81184.85 -4882.8475 222 104011 119253.22 -15242.2174 223 98104 121355.55 -23251.5455 224 67989 81184.85 -13195.8475 225 30989 47608.10 -16619.0952 226 135458 119253.22 16204.7826 227 73504 81184.85 -7680.8475 228 63123 81184.85 -18061.8475 229 61254 81184.85 -19930.8475 230 74914 81184.85 -6270.8475 231 31774 47608.10 -15834.0952 232 81437 81184.85 252.1525 233 87186 119253.22 -32067.2174 234 50090 47608.10 2481.9048 235 65745 81184.85 -15439.8475 236 56653 81184.85 -24531.8475 237 158399 81184.85 77214.1525 238 46455 81184.85 -34729.8475 239 73624 81184.85 -7560.8475 240 38395 66878.45 -28483.4500 241 91899 66878.45 25020.5500 242 139526 119253.22 20272.7826 243 52164 81184.85 -29020.8475 244 51567 81184.85 -29617.8475 245 70551 81184.85 -10633.8475 246 84856 81184.85 3671.1525 247 102538 119253.22 -16715.2174 248 86678 66878.45 19799.5500 249 85709 81184.85 4524.1525 250 34662 47608.10 -12946.0952 251 150580 119253.22 31326.7826 252 99611 104183.56 -4572.5556 253 19349 22366.50 -3017.5000 254 99373 66878.45 32494.5500 255 86230 81184.85 5045.1525 256 30837 22366.50 8470.5000 257 31706 81184.85 -49478.8475 258 89806 81184.85 8621.1525 259 62088 66878.45 -4790.4500 260 40151 66878.45 -26727.4500 261 27634 47608.10 -19974.0952 262 76990 104183.56 -27193.5556 263 37460 47608.10 -10148.0952 264 54157 81184.85 -27027.8475 265 49862 66878.45 -17016.4500 266 84337 81184.85 3152.1525 267 64175 81184.85 -17009.8475 268 59382 81184.85 -21802.8475 269 119308 81184.85 38123.1525 270 76702 81184.85 -4482.8475 271 103425 66878.45 36546.5500 272 70344 81184.85 -10840.8475 273 43410 22366.50 21043.5000 274 104838 104183.56 654.4444 275 62215 81184.85 -18969.8475 276 69304 81184.85 -11880.8475 277 53117 47608.10 5508.9048 278 19764 22366.50 -2602.5000 279 86680 81184.85 5495.1525 280 84105 47608.10 36496.9048 281 77945 81184.85 -3239.8475 282 89113 81184.85 7928.1525 283 91005 81184.85 9820.1525 284 40248 22366.50 17881.5000 285 64187 66878.45 -2691.4500 286 50857 47608.10 3248.9048 287 56613 47608.10 9004.9048 288 62792 81184.85 -18392.8475 289 72535 47608.10 24926.9048 > 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/43yox1324668256.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/5arap1324668256.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/6afxo1324668256.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/7vry11324668256.tab") + } > > try(system("convert tmp/2pzbl1324668256.ps tmp/2pzbl1324668256.png",intern=TRUE)) character(0) > try(system("convert tmp/3a2jv1324668256.ps tmp/3a2jv1324668256.png",intern=TRUE)) character(0) > try(system("convert tmp/43yox1324668256.ps tmp/43yox1324668256.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.360 0.160 4.486