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(17140 + ,101645 + ,88 + ,20 + ,11 + ,27570 + ,101011 + ,41 + ,30 + ,13 + ,1423 + ,7176 + ,1 + ,0 + ,0 + ,22996 + ,96560 + ,129 + ,42 + ,17 + ,39992 + ,175824 + ,107 + ,57 + ,20 + ,117105 + ,341570 + ,190 + ,94 + ,21 + ,23789 + ,103597 + ,66 + ,27 + ,16 + ,26706 + ,112611 + ,36 + ,46 + ,20 + ,24266 + ,85574 + ,71 + ,37 + ,21 + ,44418 + ,220801 + ,105 + ,51 + ,18 + ,35232 + ,92661 + ,133 + ,40 + ,17 + ,40909 + ,133328 + ,79 + ,56 + ,20 + ,13294 + ,61361 + ,51 + ,27 + ,12 + ,32387 + ,125930 + ,207 + ,37 + ,17 + ,21233 + ,82316 + ,34 + ,27 + ,10 + ,44332 + ,102010 + ,66 + ,28 + ,13 + ,61056 + ,101523 + ,76 + ,59 + ,22 + ,13497 + ,41566 + ,42 + ,0 + ,9 + ,32334 + ,99923 + ,115 + ,44 + ,25 + ,44339 + ,22648 + ,44 + ,12 + ,13 + ,10288 + ,46698 + ,35 + ,14 + ,13 + ,65622 + ,131698 + ,74 + ,60 + ,19 + ,16563 + ,91735 + ,103 + ,7 + ,18 + ,29011 + ,79863 + ,134 + ,29 + ,22 + ,34553 + ,108043 + ,29 + ,45 + ,14 + ,23517 + ,98866 + ,140 + ,25 + ,13 + ,51009 + ,120445 + ,72 + ,36 + ,16 + ,33416 + ,116048 + ,45 + ,50 + ,20 + ,83305 + ,250047 + ,58 + ,41 + ,18 + ,27142 + ,136084 + ,69 + ,27 + ,13 + ,21399 + ,92499 + ,57 + ,25 + ,18 + ,24874 + ,135781 + ,98 + ,45 + ,14 + ,34988 + ,74408 + ,61 + ,29 + ,7 + ,45549 + ,81240 + ,89 + ,58 + ,17 + ,32755 + ,133368 + ,54 + ,37 + ,16 + ,20760 + ,79619 + ,123 + ,42 + ,11 + ,37636 + ,59194 + ,247 + ,7 + ,24 + ,65461 + ,139942 + ,46 + ,54 + ,22 + ,30080 + ,118612 + ,72 + ,54 + ,12 + ,24094 + ,72880 + ,41 + ,14 + ,19 + ,69008 + ,65475 + ,24 + ,16 + ,13 + ,54968 + ,99643 + ,45 + ,33 + ,17 + ,46090 + ,71965 + ,33 + ,32 + ,15 + ,27507 + ,77272 + ,27 + ,21 + ,16 + ,10672 + ,49289 + ,36 + ,15 + ,24 + ,34029 + ,135131 + ,87 + ,38 + ,15 + ,46300 + ,108446 + ,90 + ,22 + ,17 + ,24760 + ,89746 + ,114 + ,28 + ,18 + ,18779 + ,44296 + ,31 + ,10 + ,20 + ,21280 + ,77648 + ,45 + ,31 + ,16 + ,40662 + ,181528 + ,69 + ,32 + ,16 + ,28987 + ,134019 + ,51 + ,32 + ,18 + ,22827 + ,124064 + ,34 + ,43 + ,22 + ,18513 + ,92630 + ,60 + ,27 + ,8 + ,30594 + ,121848 + ,45 + ,37 + ,17 + ,24006 + ,52915 + ,54 + ,20 + ,18 + ,27913 + ,81872 + ,25 + ,32 + ,16 + ,42744 + ,58981 + ,38 + ,0 + ,23 + ,12934 + ,53515 + ,52 + ,5 + ,22 + ,22574 + ,60812 + ,67 + ,26 + ,13 + ,41385 + ,56375 + ,74 + ,10 + ,13 + ,18653 + ,65490 + ,38 + ,27 + ,16 + ,18472 + ,80949 + ,30 + ,11 + ,16 + ,30976 + ,76302 + ,26 + ,29 + ,20 + ,63339 + ,104011 + ,67 + ,25 + ,22 + ,25568 + ,98104 + ,132 + ,55 + ,17 + ,33747 + ,67989 + ,42 + ,23 + ,18 + ,4154 + ,30989 + ,35 + ,5 + ,17 + ,19474 + ,135458 + ,118 + ,43 + ,12 + ,35130 + ,73504 + ,68 + ,23 + ,7 + ,39067 + ,63123 + ,43 + ,34 + ,17 + ,13310 + ,61254 + ,76 + ,36 + ,14 + ,65892 + ,74914 + ,64 + ,35 + ,23 + ,4143 + ,31774 + ,48 + ,0 + ,17 + ,28579 + ,81437 + ,64 + ,37 + ,14 + ,51776 + ,87186 + ,56 + ,28 + ,15 + ,21152 + ,50090 + ,71 + ,16 + ,17 + ,38084 + ,65745 + ,75 + ,26 + ,21 + ,27717 + ,56653 + ,39 + ,38 + ,18 + ,32928 + ,158399 + ,42 + ,23 + ,18 + ,11342 + ,46455 + ,39 + ,22 + ,17 + ,19499 + ,73624 + ,93 + ,30 + ,17 + ,16380 + ,38395 + ,38 + ,16 + ,16 + ,36874 + ,91899 + ,60 + ,18 + ,15 + ,48259 + ,139526 + ,71 + ,28 + ,21 + ,16734 + ,52164 + ,52 + ,32 + ,16 + ,28207 + ,51567 + ,27 + ,21 + ,14 + ,30143 + ,70551 + ,59 + ,23 + ,15 + ,41369 + ,84856 + ,40 + ,29 + ,17 + ,45833 + ,102538 + ,79 + ,50 + ,15 + ,29156 + ,86678 + ,44 + ,12 + ,15 + ,35944 + ,85709 + ,65 + ,21 + ,10 + ,36278 + ,34662 + ,10 + ,18 + ,6 + ,45588 + ,150580 + ,124 + ,27 + ,22 + ,45097 + ,99611 + ,81 + ,41 + ,21 + ,3895 + ,19349 + ,15 + ,13 + ,1 + ,28394 + ,99373 + ,92 + ,12 + ,18 + ,18632 + ,86230 + ,42 + ,21 + ,17 + ,2325 + ,30837 + ,10 + ,8 + ,4 + ,25139 + ,31706 + ,24 + ,26 + ,10 + ,27975 + ,89806 + ,64 + ,27 + ,16 + ,14483 + ,62088 + ,45 + ,13 + ,16 + ,13127 + ,40151 + ,22 + ,16 + ,9 + ,5839 + ,27634 + ,56 + ,2 + ,16 + ,24069 + ,76990 + ,94 + ,42 + ,17 + ,3738 + ,37460 + ,19 + ,5 + ,7 + ,18625 + ,54157 + ,35 + ,37 + ,15 + ,36341 + ,49862 + ,32 + ,17 + ,14 + ,24548 + ,84337 + ,35 + ,38 + ,14 + ,21792 + ,64175 + ,48 + ,37 + ,18 + ,26263 + ,59382 + ,49 + ,29 + ,12 + ,23686 + ,119308 + ,48 + ,32 + ,16 + ,49303 + ,76702 + ,62 + ,35 + ,21 + ,25659 + ,103425 + ,96 + ,17 + ,19 + ,28904 + ,70344 + ,45 + ,20 + ,16 + ,2781 + ,43410 + ,63 + ,7 + ,1 + ,29236 + ,104838 + ,71 + ,46 + ,16 + ,19546 + ,62215 + ,26 + ,24 + ,10 + ,22818 + ,69304 + ,48 + ,40 + ,19 + ,32689 + ,53117 + ,29 + ,3 + ,12 + ,5752 + ,19764 + ,19 + ,10 + ,2 + ,22197 + ,86680 + ,45 + ,37 + ,14 + ,20055 + ,84105 + ,45 + ,17 + ,17 + ,25272 + ,77945 + ,67 + ,28 + ,19 + ,82206 + ,89113 + ,30 + ,19 + ,14 + ,32073 + ,91005 + ,36 + ,29 + ,11 + ,5444 + ,40248 + ,34 + ,8 + ,4 + ,20154 + ,64187 + ,36 + ,10 + ,16 + ,36944 + ,50857 + ,34 + ,15 + ,20 + ,8019 + ,56613 + ,37 + ,15 + ,12 + ,30884 + ,62792 + ,46 + ,28 + ,15 + ,19540 + ,72535 + ,44 + ,17 + ,16 + ,27114 + ,98146 + ,37 + ,15 + ,17 + ,112285 + ,210907 + ,81 + ,79 + ,30 + ,84786 + ,120982 + ,55 + ,58 + ,28 + ,83123 + ,176508 + ,50 + ,60 + ,38 + ,101193 + ,179321 + ,125 + ,108 + ,30 + ,38361 + ,123185 + ,40 + ,49 + ,22 + ,68504 + ,52746 + ,37 + ,0 + ,26 + ,119182 + ,385534 + ,63 + ,121 + ,25 + ,22807 + ,33170 + ,44 + ,1 + ,18 + ,116174 + ,149061 + ,66 + ,43 + ,26 + ,57635 + ,165446 + ,57 + ,69 + ,25 + ,66198 + ,237213 + ,74 + ,78 + ,38 + ,71701 + ,173326 + ,49 + ,86 + ,44 + ,57793 + ,133131 + ,52 + ,44 + ,30 + ,80444 + ,258873 + ,88 + ,104 + ,40 + ,53855 + ,180083 + ,36 + ,63 + ,34 + ,97668 + ,324799 + ,108 + ,158 + ,47 + ,133824 + ,230964 + ,43 + ,102 + ,30 + ,101481 + ,236785 + ,75 + ,77 + ,31 + ,99645 + ,135473 + ,32 + ,82 + ,23 + ,114789 + ,202925 + ,44 + ,115 + ,36 + ,99052 + ,215147 + ,85 + ,101 + ,36 + ,67654 + ,344297 + ,86 + ,80 + ,30 + ,65553 + ,153935 + ,56 + ,50 + ,25 + ,97500 + ,132943 + ,50 + ,83 + ,39 + ,69112 + ,174724 + ,135 + ,123 + ,34 + ,82753 + ,174415 + ,63 + ,73 + ,31 + ,85323 + ,225548 + ,81 + ,81 + ,31 + ,72654 + ,223632 + ,52 + ,105 + ,33 + ,30727 + ,124817 + ,44 + ,47 + ,25 + ,77873 + ,221698 + ,113 + ,105 + ,33 + ,117478 + ,210767 + ,39 + ,94 + ,35 + ,74007 + ,170266 + ,73 + ,44 + ,42 + ,90183 + ,260561 + ,48 + ,114 + ,43 + ,61542 + ,84853 + ,33 + ,38 + ,30 + ,101494 + ,294424 + ,59 + ,107 + ,33 + ,55813 + ,215641 + ,69 + ,71 + ,32 + ,79215 + ,325107 + ,64 + ,84 + ,36 + ,55461 + ,167542 + ,59 + ,59 + ,28 + ,31081 + ,106408 + ,32 + ,33 + ,14 + ,83122 + ,265769 + ,37 + ,96 + ,32 + ,70106 + ,269651 + ,31 + ,106 + ,30 + ,60578 + ,149112 + ,65 + ,56 + ,35 + ,79892 + ,152871 + ,74 + ,59 + ,28 + ,49810 + ,111665 + ,54 + ,39 + ,28 + ,71570 + ,116408 + ,76 + ,34 + ,39 + ,100708 + ,362301 + ,715 + ,76 + ,34 + ,33032 + ,78800 + ,57 + ,20 + ,26 + ,82875 + ,183167 + ,66 + ,91 + ,39 + ,139077 + ,277965 + ,106 + ,115 + ,39 + ,71595 + ,150629 + ,54 + ,85 + ,33 + ,72260 + ,168809 + ,32 + ,76 + ,28 + ,5950 + ,24188 + ,20 + ,8 + ,4 + ,115762 + ,329267 + ,71 + ,79 + ,39 + ,32551 + ,65029 + ,21 + ,21 + ,18 + ,31701 + ,101097 + ,70 + ,30 + ,14 + ,80670 + ,218946 + ,112 + ,76 + ,29 + ,143558 + ,244052 + ,66 + ,101 + ,44 + ,120733 + ,233328 + ,165 + ,92 + ,28 + ,105195 + ,256462 + ,56 + ,123 + ,35 + ,73107 + ,206161 + ,61 + ,75 + ,28 + ,132068 + ,311473 + ,53 + ,128 + ,38 + ,149193 + ,235800 + ,127 + ,105 + ,23 + ,46821 + ,177939 + ,63 + ,55 + ,36 + ,87011 + ,207176 + ,38 + ,56 + ,32 + ,95260 + ,196553 + ,50 + ,41 + ,29 + ,55183 + ,174184 + ,52 + ,72 + ,25 + ,106671 + ,143246 + ,42 + ,67 + ,27 + ,73511 + ,187559 + ,76 + ,75 + ,36 + ,92945 + ,187681 + ,67 + ,114 + ,28 + ,78664 + ,119016 + ,50 + ,118 + ,23 + ,70054 + ,182192 + ,53 + ,77 + ,40 + ,22618 + ,73566 + ,39 + ,22 + ,23 + ,74011 + ,194979 + ,50 + ,66 + ,40 + ,83737 + ,167488 + ,77 + ,69 + ,28 + ,69094 + ,143756 + ,57 + ,105 + ,34 + ,93133 + ,275541 + ,73 + ,116 + ,33 + ,95536 + ,243199 + ,34 + ,88 + ,28 + ,225920 + ,182999 + ,39 + ,73 + ,34 + ,62133 + ,135649 + ,46 + ,99 + ,30 + ,61370 + ,152299 + ,63 + ,62 + ,33 + ,43836 + ,120221 + ,35 + ,53 + ,22 + ,106117 + ,346485 + ,106 + ,118 + ,38 + ,38692 + ,145790 + ,43 + ,30 + ,26 + ,84651 + ,193339 + ,47 + ,100 + ,35 + ,56622 + ,80953 + ,31 + ,49 + ,8 + ,15986 + ,122774 + ,162 + ,24 + ,24 + ,95364 + ,130585 + ,57 + ,67 + ,29 + ,89691 + ,286468 + ,263 + ,57 + ,29 + ,67267 + ,241066 + ,78 + ,75 + ,45 + ,126846 + ,148446 + ,63 + ,135 + ,37 + ,41140 + ,204713 + ,54 + ,68 + ,33 + ,102860 + ,182079 + ,63 + ,124 + ,33 + ,51715 + ,140344 + ,77 + ,33 + ,25 + ,55801 + ,220516 + ,79 + ,98 + ,32 + ,111813 + ,243060 + ,110 + ,58 + ,29 + ,120293 + ,162765 + ,56 + ,68 + ,28 + ,138599 + ,182613 + ,56 + ,81 + ,28 + ,161647 + ,232138 + ,43 + ,131 + ,31 + ,115929 + ,265318 + ,111 + ,110 + ,52 + ,162901 + ,310839 + ,62 + ,130 + ,24 + ,109825 + ,225060 + ,56 + ,93 + ,41 + ,129838 + ,232317 + ,74 + ,118 + ,33 + ,37510 + ,144966 + ,60 + ,39 + ,32 + ,43750 + ,43287 + ,43 + ,13 + ,19 + ,40652 + ,155754 + ,68 + ,74 + ,20 + ,87771 + ,164709 + ,53 + ,81 + ,31 + ,85872 + ,201940 + ,87 + ,109 + ,31 + ,89275 + ,235454 + ,46 + ,151 + ,32 + ,192565 + ,99466 + ,32 + ,28 + ,23 + ,140867 + ,100750 + ,67 + ,83 + ,30 + ,120662 + ,224549 + ,47 + ,54 + ,31 + ,101338 + ,243511 + ,65 + ,133 + ,42 + ,1168 + ,22938 + ,9 + ,12 + ,1 + ,65567 + ,152474 + ,45 + ,106 + ,32 + ,25162 + ,61857 + ,25 + ,23 + ,11 + ,40735 + ,132487 + ,97 + ,71 + ,36 + ,91413 + ,317394 + ,53 + ,116 + ,31 + ,855 + ,21054 + ,2 + ,4 + ,0 + ,97068 + ,209641 + ,52 + ,62 + ,24 + ,14116 + ,31414 + ,22 + ,18 + ,8 + ,76643 + ,244749 + ,144 + ,98 + ,33 + ,110681 + ,184510 + ,60 + ,64 + ,40 + ,92696 + ,128423 + ,89 + ,32 + ,38 + ,94785 + ,97839 + ,42 + ,25 + ,24 + ,8773 + ,38214 + ,52 + ,16 + ,8 + ,83209 + ,151101 + ,98 + ,48 + ,35 + ,93815 + ,272458 + ,99 + ,100 + ,43 + ,86687 + ,172494 + ,52 + ,46 + ,43 + ,105547 + ,328107 + ,125 + ,129 + ,41 + ,103487 + ,250579 + ,106 + ,130 + ,38 + ,213688 + ,351067 + ,95 + ,136 + ,45 + ,71220 + ,158015 + ,40 + ,59 + ,31 + ,56926 + ,85439 + ,43 + ,32 + ,28 + ,91721 + ,229242 + ,128 + ,63 + ,31 + ,115168 + ,351619 + ,142 + ,95 + ,40 + ,111194 + ,84207 + ,73 + ,14 + ,30 + ,135777 + ,324598 + ,128 + ,113 + ,37 + ,51513 + ,131069 + ,61 + ,47 + ,30 + ,74163 + ,204271 + ,73 + ,92 + ,35 + ,51633 + ,165543 + ,148 + ,70 + ,32 + ,75345 + ,141722 + ,64 + ,19 + ,27 + ,98952 + ,299775 + ,97 + ,91 + ,31 + ,102372 + ,195838 + ,50 + ,111 + ,31 + ,37238 + ,173260 + ,37 + ,41 + ,21 + ,103772 + ,254488 + ,50 + ,120 + ,39 + ,123969 + ,104389 + ,105 + ,135 + ,41 + ,135400 + ,199476 + ,46 + ,87 + ,32 + ,130115 + ,224330 + ,52 + ,131 + ,39 + ,6023 + ,14688 + ,0 + ,4 + ,0 + ,64466 + ,181633 + ,48 + ,47 + ,30 + ,54990 + ,271856 + ,91 + ,109 + ,37 + ,1644 + ,7199 + ,0 + ,7 + ,0 + ,6179 + ,46660 + ,7 + ,12 + ,5 + ,3926 + ,17547 + ,3 + ,0 + ,1 + ,34777 + ,95227 + ,70 + ,37 + ,32 + ,73224 + ,152601 + ,36 + ,46 + ,24) + ,dim=c(5 + ,289) + ,dimnames=list(c('Total_size' + ,'Time_RFC' + ,'PR_views' + ,'Blogged' + ,'Reviewed') + ,1:289)) > y <- array(NA,dim=c(5,289),dimnames=list(c('Total_size','Time_RFC','PR_views','Blogged','Reviewed'),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_RFC" > x[,par1] [1] 101645 101011 7176 96560 175824 341570 103597 112611 85574 220801 [11] 92661 133328 61361 125930 82316 102010 101523 41566 99923 22648 [21] 46698 131698 91735 79863 108043 98866 120445 116048 250047 136084 [31] 92499 135781 74408 81240 133368 79619 59194 139942 118612 72880 [41] 65475 99643 71965 77272 49289 135131 108446 89746 44296 77648 [51] 181528 134019 124064 92630 121848 52915 81872 58981 53515 60812 [61] 56375 65490 80949 76302 104011 98104 67989 30989 135458 73504 [71] 63123 61254 74914 31774 81437 87186 50090 65745 56653 158399 [81] 46455 73624 38395 91899 139526 52164 51567 70551 84856 102538 [91] 86678 85709 34662 150580 99611 19349 99373 86230 30837 31706 [101] 89806 62088 40151 27634 76990 37460 54157 49862 84337 64175 [111] 59382 119308 76702 103425 70344 43410 104838 62215 69304 53117 [121] 19764 86680 84105 77945 89113 91005 40248 64187 50857 56613 [131] 62792 72535 98146 210907 120982 176508 179321 123185 52746 385534 [141] 33170 149061 165446 237213 173326 133131 258873 180083 324799 230964 [151] 236785 135473 202925 215147 344297 153935 132943 174724 174415 225548 [161] 223632 124817 221698 210767 170266 260561 84853 294424 215641 325107 [171] 167542 106408 265769 269651 149112 152871 111665 116408 362301 78800 [181] 183167 277965 150629 168809 24188 329267 65029 101097 218946 244052 [191] 233328 256462 206161 311473 235800 177939 207176 196553 174184 143246 [201] 187559 187681 119016 182192 73566 194979 167488 143756 275541 243199 [211] 182999 135649 152299 120221 346485 145790 193339 80953 122774 130585 [221] 286468 241066 148446 204713 182079 140344 220516 243060 162765 182613 [231] 232138 265318 310839 225060 232317 144966 43287 155754 164709 201940 [241] 235454 99466 100750 224549 243511 22938 152474 61857 132487 317394 [251] 21054 209641 31414 244749 184510 128423 97839 38214 151101 272458 [261] 172494 328107 250579 351067 158015 85439 229242 351619 84207 324598 [271] 131069 204271 165543 141722 299775 195838 173260 254488 104389 199476 [281] 224330 14688 181633 271856 7199 46660 17547 95227 152601 > 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] "Total_size" "Time_RFC" "PR_views" "Blogged" "Reviewed" > colnames(x)[par1] [1] "Time_RFC" > x[,par1] [1] 101645 101011 7176 96560 175824 341570 103597 112611 85574 220801 [11] 92661 133328 61361 125930 82316 102010 101523 41566 99923 22648 [21] 46698 131698 91735 79863 108043 98866 120445 116048 250047 136084 [31] 92499 135781 74408 81240 133368 79619 59194 139942 118612 72880 [41] 65475 99643 71965 77272 49289 135131 108446 89746 44296 77648 [51] 181528 134019 124064 92630 121848 52915 81872 58981 53515 60812 [61] 56375 65490 80949 76302 104011 98104 67989 30989 135458 73504 [71] 63123 61254 74914 31774 81437 87186 50090 65745 56653 158399 [81] 46455 73624 38395 91899 139526 52164 51567 70551 84856 102538 [91] 86678 85709 34662 150580 99611 19349 99373 86230 30837 31706 [101] 89806 62088 40151 27634 76990 37460 54157 49862 84337 64175 [111] 59382 119308 76702 103425 70344 43410 104838 62215 69304 53117 [121] 19764 86680 84105 77945 89113 91005 40248 64187 50857 56613 [131] 62792 72535 98146 210907 120982 176508 179321 123185 52746 385534 [141] 33170 149061 165446 237213 173326 133131 258873 180083 324799 230964 [151] 236785 135473 202925 215147 344297 153935 132943 174724 174415 225548 [161] 223632 124817 221698 210767 170266 260561 84853 294424 215641 325107 [171] 167542 106408 265769 269651 149112 152871 111665 116408 362301 78800 [181] 183167 277965 150629 168809 24188 329267 65029 101097 218946 244052 [191] 233328 256462 206161 311473 235800 177939 207176 196553 174184 143246 [201] 187559 187681 119016 182192 73566 194979 167488 143756 275541 243199 [211] 182999 135649 152299 120221 346485 145790 193339 80953 122774 130585 [221] 286468 241066 148446 204713 182079 140344 220516 243060 162765 182613 [231] 232138 265318 310839 225060 232317 144966 43287 155754 164709 201940 [241] 235454 99466 100750 224549 243511 22938 152474 61857 132487 317394 [251] 21054 209641 31414 244749 184510 128423 97839 38214 151101 272458 [261] 172494 328107 250579 351067 158015 85439 229242 351619 84207 324598 [271] 131069 204271 165543 141722 299775 195838 173260 254488 104389 199476 [281] 224330 14688 181633 271856 7199 46660 17547 95227 152601 > 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/1rcwb1324132594.tab") + } + } > m Conditional inference tree with 10 terminal nodes Response: Time_RFC Inputs: Total_size, PR_views, Blogged, Reviewed Number of observations: 289 1) Blogged <= 50; criterion = 1, statistic = 198.82 2) Blogged <= 18; criterion = 1, statistic = 79.237 3) Reviewed <= 9; criterion = 1, statistic = 21.404 4)* weights = 19 3) Reviewed > 9 5)* weights = 34 2) Blogged > 18 6) Reviewed <= 23; criterion = 1, statistic = 26.563 7) Blogged <= 40; criterion = 0.994, statistic = 10.059 8) PR_views <= 68; criterion = 0.992, statistic = 9.475 9)* weights = 57 8) PR_views > 68 10)* weights = 18 7) Blogged > 40 11)* weights = 16 6) Reviewed > 23 12)* weights = 25 1) Blogged > 50 13) Blogged <= 74; criterion = 1, statistic = 25.667 14) Reviewed <= 28; criterion = 0.967, statistic = 6.938 15)* weights = 20 14) Reviewed > 28 16)* weights = 20 13) Blogged > 74 17) PR_views <= 85; criterion = 0.99, statistic = 9.216 18)* weights = 55 17) PR_views > 85 19)* weights = 25 > postscript(file="/var/wessaorg/rcomp/tmp/2ctwd1324132594.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/3ejr81324132594.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 101645 108208.06 -6563.0556 2 101011 80754.93 20256.0702 3 7176 28343.42 -21167.4211 4 96560 119975.38 -23415.3750 5 175824 147060.60 28763.4000 6 341570 271462.48 70107.5200 7 103597 80754.93 22842.0702 8 112611 119975.38 -7364.3750 9 85574 108208.06 -22634.0556 10 220801 147060.60 73740.4000 11 92661 108208.06 -15547.0556 12 133328 147060.60 -13732.6000 13 61361 80754.93 -19393.9298 14 125930 108208.06 17721.9444 15 82316 80754.93 1561.0702 16 102010 80754.93 21255.0702 17 101523 147060.60 -45537.6000 18 41566 28343.42 13222.5789 19 99923 132433.36 -32510.3600 20 22648 60800.35 -38152.3529 21 46698 60800.35 -14102.3529 22 131698 147060.60 -15362.6000 23 91735 60800.35 30934.6471 24 79863 108208.06 -28345.0556 25 108043 119975.38 -11932.3750 26 98866 108208.06 -9342.0556 27 120445 108208.06 12236.9444 28 116048 119975.38 -3927.3750 29 250047 119975.38 130071.6250 30 136084 108208.06 27875.9444 31 92499 80754.93 11744.0702 32 135781 119975.38 15805.6250 33 74408 80754.93 -6346.9298 34 81240 147060.60 -65820.6000 35 133368 80754.93 52613.0702 36 79619 119975.38 -40356.3750 37 59194 60800.35 -1606.3529 38 139942 147060.60 -7118.6000 39 118612 147060.60 -28448.6000 40 72880 60800.35 12079.6471 41 65475 60800.35 4674.6471 42 99643 80754.93 18888.0702 43 71965 80754.93 -8789.9298 44 77272 80754.93 -3482.9298 45 49289 60800.35 -11511.3529 46 135131 108208.06 26922.9444 47 108446 108208.06 237.9444 48 89746 108208.06 -18462.0556 49 44296 60800.35 -16504.3529 50 77648 80754.93 -3106.9298 51 181528 108208.06 73319.9444 52 134019 80754.93 53264.0702 53 124064 119975.38 4088.6250 54 92630 80754.93 11875.0702 55 121848 80754.93 41093.0702 56 52915 80754.93 -27839.9298 57 81872 80754.93 1117.0702 58 58981 60800.35 -1819.3529 59 53515 60800.35 -7285.3529 60 60812 80754.93 -19942.9298 61 56375 60800.35 -4425.3529 62 65490 80754.93 -15264.9298 63 80949 60800.35 20148.6471 64 76302 80754.93 -4452.9298 65 104011 80754.93 23256.0702 66 98104 147060.60 -48956.6000 67 67989 80754.93 -12765.9298 68 30989 60800.35 -29811.3529 69 135458 119975.38 15482.6250 70 73504 80754.93 -7250.9298 71 63123 80754.93 -17631.9298 72 61254 108208.06 -46954.0556 73 74914 80754.93 -5840.9298 74 31774 60800.35 -29026.3529 75 81437 80754.93 682.0702 76 87186 80754.93 6431.0702 77 50090 60800.35 -10710.3529 78 65745 108208.06 -42463.0556 79 56653 80754.93 -24101.9298 80 158399 80754.93 77644.0702 81 46455 80754.93 -34299.9298 82 73624 108208.06 -34584.0556 83 38395 60800.35 -22405.3529 84 91899 60800.35 31098.6471 85 139526 108208.06 31317.9444 86 52164 80754.93 -28590.9298 87 51567 80754.93 -29187.9298 88 70551 80754.93 -10203.9298 89 84856 80754.93 4101.0702 90 102538 119975.38 -17437.3750 91 86678 60800.35 25877.6471 92 85709 80754.93 4954.0702 93 34662 28343.42 6318.5789 94 150580 108208.06 42371.9444 95 99611 119975.38 -20364.3750 96 19349 28343.42 -8994.4211 97 99373 60800.35 38572.6471 98 86230 80754.93 5475.0702 99 30837 28343.42 2493.5789 100 31706 80754.93 -49048.9298 101 89806 80754.93 9051.0702 102 62088 60800.35 1287.6471 103 40151 28343.42 11807.5789 104 27634 60800.35 -33166.3529 105 76990 119975.38 -42985.3750 106 37460 28343.42 9116.5789 107 54157 80754.93 -26597.9298 108 49862 60800.35 -10938.3529 109 84337 80754.93 3582.0702 110 64175 80754.93 -16579.9298 111 59382 80754.93 -21372.9298 112 119308 80754.93 38553.0702 113 76702 80754.93 -4052.9298 114 103425 60800.35 42624.6471 115 70344 80754.93 -10410.9298 116 43410 28343.42 15066.5789 117 104838 119975.38 -15137.3750 118 62215 80754.93 -18539.9298 119 69304 80754.93 -11450.9298 120 53117 60800.35 -7683.3529 121 19764 28343.42 -8579.4211 122 86680 80754.93 5925.0702 123 84105 60800.35 23304.6471 124 77945 80754.93 -2809.9298 125 89113 80754.93 8358.0702 126 91005 80754.93 10250.0702 127 40248 28343.42 11904.5789 128 64187 60800.35 3386.6471 129 50857 60800.35 -9943.3529 130 56613 60800.35 -4187.3529 131 62792 80754.93 -17962.9298 132 72535 60800.35 11734.6471 133 98146 60800.35 37345.6471 134 210907 218589.04 -7682.0364 135 120982 147060.60 -26078.6000 136 176508 188516.15 -12008.1500 137 179321 271462.48 -92141.4800 138 123185 119975.38 3209.6250 139 52746 60800.35 -8054.3529 140 385534 218589.04 166944.9636 141 33170 60800.35 -27630.3529 142 149061 132433.36 16627.6400 143 165446 147060.60 18385.4000 144 237213 218589.04 18623.9636 145 173326 218589.04 -45263.0364 146 133131 132433.36 697.6400 147 258873 271462.48 -12589.4800 148 180083 188516.15 -8433.1500 149 324799 271462.48 53336.5200 150 230964 218589.04 12374.9636 151 236785 218589.04 18195.9636 152 135473 218589.04 -83116.0364 153 202925 218589.04 -15664.0364 154 215147 218589.04 -3442.0364 155 344297 271462.48 72834.5200 156 153935 132433.36 21501.6400 157 132943 218589.04 -85646.0364 158 174724 271462.48 -96738.4800 159 174415 188516.15 -14101.1500 160 225548 218589.04 6958.9636 161 223632 218589.04 5042.9636 162 124817 132433.36 -7616.3600 163 221698 271462.48 -49764.4800 164 210767 218589.04 -7822.0364 165 170266 132433.36 37832.6400 166 260561 218589.04 41971.9636 167 84853 132433.36 -47580.3600 168 294424 218589.04 75834.9636 169 215641 188516.15 27124.8500 170 325107 218589.04 106517.9636 171 167542 147060.60 20481.4000 172 106408 80754.93 25653.0702 173 265769 218589.04 47179.9636 174 269651 218589.04 51061.9636 175 149112 188516.15 -39404.1500 176 152871 147060.60 5810.4000 177 111665 132433.36 -20768.3600 178 116408 132433.36 -16025.3600 179 362301 271462.48 90838.5200 180 78800 132433.36 -53633.3600 181 183167 218589.04 -35422.0364 182 277965 271462.48 6502.5200 183 150629 218589.04 -67960.0364 184 168809 218589.04 -49780.0364 185 24188 28343.42 -4155.4211 186 329267 218589.04 110677.9636 187 65029 80754.93 -15725.9298 188 101097 108208.06 -7111.0556 189 218946 271462.48 -52516.4800 190 244052 218589.04 25462.9636 191 233328 271462.48 -38134.4800 192 256462 218589.04 37872.9636 193 206161 218589.04 -12428.0364 194 311473 218589.04 92883.9636 195 235800 271462.48 -35662.4800 196 177939 188516.15 -10577.1500 197 207176 188516.15 18659.8500 198 196553 132433.36 64119.6400 199 174184 147060.60 27123.4000 200 143246 147060.60 -3814.6000 201 187559 218589.04 -31030.0364 202 187681 218589.04 -30908.0364 203 119016 218589.04 -99573.0364 204 182192 218589.04 -36397.0364 205 73566 80754.93 -7188.9298 206 194979 188516.15 6462.8500 207 167488 147060.60 20427.4000 208 143756 218589.04 -74833.0364 209 275541 218589.04 56951.9636 210 243199 218589.04 24609.9636 211 182999 188516.15 -5517.1500 212 135649 218589.04 -82940.0364 213 152299 188516.15 -36217.1500 214 120221 147060.60 -26839.6000 215 346485 271462.48 75022.5200 216 145790 132433.36 13356.6400 217 193339 218589.04 -25250.0364 218 80953 119975.38 -39022.3750 219 122774 132433.36 -9659.3600 220 130585 188516.15 -57931.1500 221 286468 188516.15 97951.8500 222 241066 218589.04 22476.9636 223 148446 218589.04 -70143.0364 224 204713 188516.15 16196.8500 225 182079 218589.04 -36510.0364 226 140344 132433.36 7910.6400 227 220516 218589.04 1926.9636 228 243060 188516.15 54543.8500 229 162765 147060.60 15704.4000 230 182613 218589.04 -35976.0364 231 232138 218589.04 13548.9636 232 265318 271462.48 -6144.4800 233 310839 218589.04 92249.9636 234 225060 218589.04 6470.9636 235 232317 218589.04 13727.9636 236 144966 132433.36 12532.6400 237 43287 60800.35 -17513.3529 238 155754 147060.60 8693.4000 239 164709 218589.04 -53880.0364 240 201940 271462.48 -69522.4800 241 235454 218589.04 16864.9636 242 99466 80754.93 18711.0702 243 100750 218589.04 -117839.0364 244 224549 188516.15 36032.8500 245 243511 218589.04 24921.9636 246 22938 28343.42 -5405.4211 247 152474 218589.04 -66115.0364 248 61857 80754.93 -18897.9298 249 132487 188516.15 -56029.1500 250 317394 218589.04 98804.9636 251 21054 28343.42 -7289.4211 252 209641 147060.60 62580.4000 253 31414 28343.42 3070.5789 254 244749 271462.48 -26713.4800 255 184510 188516.15 -4006.1500 256 128423 132433.36 -4010.3600 257 97839 132433.36 -34594.3600 258 38214 28343.42 9870.5789 259 151101 132433.36 18667.6400 260 272458 271462.48 995.5200 261 172494 132433.36 40060.6400 262 328107 271462.48 56644.5200 263 250579 271462.48 -20883.4800 264 351067 271462.48 79604.5200 265 158015 188516.15 -30501.1500 266 85439 132433.36 -46994.3600 267 229242 188516.15 40725.8500 268 351619 271462.48 80156.5200 269 84207 60800.35 23406.6471 270 324598 271462.48 53135.5200 271 131069 132433.36 -1364.3600 272 204271 218589.04 -14318.0364 273 165543 188516.15 -22973.1500 274 141722 132433.36 9288.6400 275 299775 271462.48 28312.5200 276 195838 218589.04 -22751.0364 277 173260 119975.38 53284.6250 278 254488 218589.04 35898.9636 279 104389 271462.48 -167073.4800 280 199476 218589.04 -19113.0364 281 224330 218589.04 5740.9636 282 14688 28343.42 -13655.4211 283 181633 132433.36 49199.6400 284 271856 271462.48 393.5200 285 7199 28343.42 -21144.4211 286 46660 28343.42 18316.5789 287 17547 28343.42 -10796.4211 288 95227 132433.36 -37206.3600 289 152601 132433.36 20167.6400 > 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/44cw11324132594.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/58ga51324132594.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/6zf1m1324132594.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/754x01324132594.tab") + } > > try(system("convert tmp/2ctwd1324132594.ps tmp/2ctwd1324132594.png",intern=TRUE)) character(0) > try(system("convert tmp/3ejr81324132594.ps tmp/3ejr81324132594.png",intern=TRUE)) character(0) > try(system("convert tmp/44cw11324132594.ps tmp/44cw11324132594.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.377 0.306 5.935