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(146283 + ,30 + ,79 + ,56 + ,1418 + ,98364 + ,28 + ,58 + ,56 + ,869 + ,86146 + ,38 + ,60 + ,54 + ,1530 + ,96933 + ,30 + ,108 + ,89 + ,2172 + ,79234 + ,22 + ,49 + ,40 + ,901 + ,42551 + ,26 + ,0 + ,25 + ,463 + ,195663 + ,25 + ,121 + ,92 + ,3201 + ,6853 + ,18 + ,1 + ,18 + ,371 + ,21529 + ,11 + ,20 + ,63 + ,1192 + ,95757 + ,26 + ,43 + ,44 + ,1583 + ,85584 + ,25 + ,69 + ,33 + ,1439 + ,143983 + ,38 + ,78 + ,84 + ,1764 + ,75851 + ,44 + ,86 + ,88 + ,1495 + ,59238 + ,30 + ,44 + ,55 + ,1373 + ,93163 + ,40 + ,104 + ,60 + ,2187 + ,96037 + ,34 + ,63 + ,66 + ,1491 + ,151511 + ,47 + ,158 + ,154 + ,4041 + ,136368 + ,30 + ,102 + ,53 + ,1706 + ,112642 + ,31 + ,77 + ,119 + ,2152 + ,94728 + ,23 + ,82 + ,41 + ,1036 + ,105499 + ,36 + ,115 + ,61 + ,1882 + ,121527 + ,36 + ,101 + ,58 + ,1929 + ,127766 + ,30 + ,80 + ,75 + ,2242 + ,98958 + ,25 + ,50 + ,33 + ,1220 + ,77900 + ,39 + ,83 + ,40 + ,1289 + ,85646 + ,34 + ,123 + ,92 + ,2515 + ,98579 + ,31 + ,73 + ,100 + ,2147 + ,130767 + ,31 + ,81 + ,112 + ,2352 + ,131741 + ,33 + ,105 + ,73 + ,1638 + ,53907 + ,25 + ,47 + ,40 + ,1222 + ,178812 + ,33 + ,105 + ,45 + ,1812 + ,146761 + ,35 + ,94 + ,60 + ,1677 + ,82036 + ,42 + ,44 + ,62 + ,1579 + ,163253 + ,43 + ,114 + ,75 + ,1731 + ,27032 + ,30 + ,38 + ,31 + ,807 + ,171975 + ,33 + ,107 + ,77 + ,2452 + ,65990 + ,13 + ,30 + ,34 + ,829 + ,86572 + ,32 + ,71 + ,46 + ,1940 + ,159676 + ,36 + ,84 + ,99 + ,2662 + ,1929 + ,0 + ,0 + ,17 + ,186 + ,85371 + ,28 + ,59 + ,66 + ,1499 + ,58391 + ,14 + ,33 + ,30 + ,865 + ,31580 + ,17 + ,42 + ,76 + ,1793 + ,136815 + ,32 + ,96 + ,146 + ,2527 + ,120642 + ,30 + ,106 + ,67 + ,2747 + ,69107 + ,35 + ,56 + ,56 + ,1324 + ,50495 + ,20 + ,57 + ,107 + ,2702 + ,108016 + ,28 + ,59 + ,58 + ,1383 + ,46341 + ,28 + ,39 + ,34 + ,1179 + ,78348 + ,39 + ,34 + ,61 + ,2099 + ,79336 + ,34 + ,76 + ,119 + ,4308 + ,56968 + ,26 + ,20 + ,42 + ,918 + ,93176 + ,39 + ,91 + ,66 + ,1831 + ,161632 + ,39 + ,115 + ,89 + ,3373 + ,87850 + ,33 + ,85 + ,44 + ,1713 + ,127969 + ,28 + ,76 + ,66 + ,1438 + ,15049 + ,4 + ,8 + ,24 + ,496 + ,155135 + ,39 + ,79 + ,259 + ,2253 + ,25109 + ,18 + ,21 + ,17 + ,744 + ,45824 + ,14 + ,30 + ,64 + ,1161 + ,102996 + ,29 + ,76 + ,41 + ,2352 + ,160604 + ,44 + ,101 + ,68 + ,2144 + ,158051 + ,21 + ,94 + ,168 + ,4691 + ,44547 + ,16 + ,27 + ,43 + ,1112 + ,162647 + ,28 + ,92 + ,132 + ,2694 + ,174141 + ,35 + ,123 + ,105 + ,1973 + ,60622 + ,28 + ,75 + ,71 + ,1769 + ,179566 + ,38 + ,128 + ,112 + ,3148 + ,184301 + ,23 + ,105 + ,94 + ,2474 + ,75661 + ,36 + ,55 + ,82 + ,2084 + ,96144 + ,32 + ,56 + ,70 + ,1954 + ,129847 + ,29 + ,41 + ,57 + ,1226 + ,117286 + ,25 + ,72 + ,53 + ,1389 + ,71180 + ,27 + ,67 + ,103 + ,1496 + ,109377 + ,36 + ,75 + ,121 + ,2269 + ,85298 + ,28 + ,114 + ,62 + ,1833 + ,73631 + ,23 + ,118 + ,52 + ,1268 + ,86767 + ,40 + ,77 + ,52 + ,1943 + ,23824 + ,23 + ,22 + ,32 + ,893 + ,93487 + ,40 + ,66 + ,62 + ,1762 + ,82981 + ,28 + ,69 + ,45 + ,1403 + ,73815 + ,34 + ,105 + ,46 + ,1425 + ,94552 + ,33 + ,116 + ,63 + ,1857 + ,132190 + ,28 + ,88 + ,75 + ,1840 + ,128754 + ,34 + ,73 + ,88 + ,1502 + ,66363 + ,30 + ,99 + ,46 + ,1441 + ,67808 + ,33 + ,62 + ,53 + ,1420 + ,61724 + ,22 + ,53 + ,37 + ,1416 + ,131722 + ,38 + ,118 + ,90 + ,2970 + ,68580 + ,26 + ,30 + ,63 + ,1317 + ,106175 + ,35 + ,100 + ,78 + ,1644 + ,55792 + ,8 + ,49 + ,25 + ,870 + ,25157 + ,24 + ,24 + ,45 + ,1654 + ,76669 + ,29 + ,67 + ,46 + ,1054 + ,57283 + ,20 + ,46 + ,41 + ,937 + ,105805 + ,29 + ,57 + ,144 + ,3004 + ,129484 + ,45 + ,75 + ,82 + ,2008 + ,72413 + ,37 + ,135 + ,91 + ,2547 + ,87831 + ,33 + ,68 + ,71 + ,1885 + ,96971 + ,33 + ,124 + ,63 + ,1626 + ,71299 + ,25 + ,33 + ,53 + ,1468 + ,77494 + ,32 + ,98 + ,62 + ,2445 + ,120336 + ,29 + ,58 + ,63 + ,1964 + ,93913 + ,28 + ,68 + ,32 + ,1381 + ,136048 + ,28 + ,81 + ,39 + ,1369 + ,181248 + ,31 + ,131 + ,62 + ,1659 + ,146123 + ,52 + ,110 + ,117 + ,2888 + ,32036 + ,21 + ,37 + ,34 + ,1290 + ,186646 + ,24 + ,130 + ,92 + ,2845 + ,102255 + ,41 + ,93 + ,93 + ,1982 + ,168237 + ,33 + ,118 + ,54 + ,1904 + ,64219 + ,32 + ,39 + ,144 + ,1391 + ,19630 + ,19 + ,13 + ,14 + ,602 + ,76825 + ,20 + ,74 + ,61 + ,1743 + ,115338 + ,31 + ,81 + ,109 + ,1559 + ,109427 + ,31 + ,109 + ,38 + ,2014 + ,118168 + ,32 + ,151 + ,73 + ,2143 + ,84845 + ,18 + ,51 + ,75 + ,2146 + ,153197 + ,23 + ,28 + ,50 + ,874 + ,29877 + ,17 + ,40 + ,61 + ,1590 + ,63506 + ,20 + ,56 + ,55 + ,1590 + ,22445 + ,12 + ,27 + ,77 + ,1210 + ,47695 + ,17 + ,37 + ,75 + ,2072 + ,68370 + ,30 + ,83 + ,72 + ,1281 + ,146304 + ,31 + ,54 + ,50 + ,1401 + ,38233 + ,10 + ,27 + ,32 + ,834 + ,42071 + ,13 + ,28 + ,53 + ,1105 + ,50517 + ,22 + ,59 + ,42 + ,1272 + ,103950 + ,42 + ,133 + ,71 + ,1944 + ,5841 + ,1 + ,12 + ,10 + ,391 + ,2341 + ,9 + ,0 + ,35 + ,761 + ,84396 + ,32 + ,106 + ,65 + ,1605 + ,24610 + ,11 + ,23 + ,25 + ,530 + ,35753 + ,25 + ,44 + ,66 + ,1988 + ,55515 + ,36 + ,71 + ,41 + ,1386 + ,209056 + ,31 + ,116 + ,86 + ,2395 + ,6622 + ,0 + ,4 + ,16 + ,387 + ,115814 + ,24 + ,62 + ,42 + ,1742 + ,11609 + ,13 + ,12 + ,19 + ,620 + ,13155 + ,8 + ,18 + ,19 + ,449 + ,18274 + ,13 + ,14 + ,45 + ,800 + ,72875 + ,19 + ,60 + ,65 + ,1684 + ,10112 + ,18 + ,7 + ,35 + ,1050 + ,142775 + ,33 + ,98 + ,95 + ,2699 + ,68847 + ,40 + ,64 + ,49 + ,1606 + ,17659 + ,22 + ,29 + ,37 + ,1502 + ,20112 + ,38 + ,32 + ,64 + ,1204 + ,61023 + ,24 + ,25 + ,38 + ,1138 + ,13983 + ,8 + ,16 + ,34 + ,568 + ,65176 + ,35 + ,48 + ,32 + ,1459 + ,132432 + ,43 + ,100 + ,65 + ,2158 + ,112494 + ,43 + ,46 + ,52 + ,1111 + ,45109 + ,14 + ,45 + ,62 + ,1421 + ,170875 + ,41 + ,129 + ,65 + ,2833 + ,180759 + ,38 + ,130 + ,83 + ,1955 + ,214921 + ,45 + ,136 + ,95 + ,2922 + ,100226 + ,31 + ,59 + ,29 + ,1002 + ,32043 + ,13 + ,25 + ,18 + ,1060 + ,54454 + ,28 + ,32 + ,33 + ,956 + ,78876 + ,31 + ,63 + ,247 + ,2186 + ,170745 + ,40 + ,95 + ,139 + ,3604 + ,6940 + ,30 + ,14 + ,29 + ,1035 + ,49025 + ,16 + ,36 + ,118 + ,1417 + ,122037 + ,37 + ,113 + ,110 + ,3261 + ,53782 + ,30 + ,47 + ,67 + ,1587 + ,127748 + ,35 + ,92 + ,42 + ,1424 + ,86839 + ,32 + ,70 + ,65 + ,1701 + ,44830 + ,27 + ,19 + ,94 + ,1249 + ,77395 + ,20 + ,50 + ,64 + ,946 + ,89324 + ,18 + ,41 + ,81 + ,1926 + ,103300 + ,31 + ,91 + ,95 + ,3352 + ,112283 + ,31 + ,111 + ,67 + ,1641 + ,10901 + ,21 + ,41 + ,63 + ,2035 + ,120691 + ,39 + ,120 + ,83 + ,2312 + ,58106 + ,41 + ,135 + ,45 + ,1369 + ,57140 + ,13 + ,27 + ,30 + ,1577 + ,122422 + ,32 + ,87 + ,70 + ,2201 + ,25899 + ,18 + ,25 + ,32 + ,961 + ,139296 + ,39 + ,131 + ,83 + ,1900 + ,52678 + ,14 + ,45 + ,31 + ,1254 + ,23853 + ,7 + ,29 + ,67 + ,1335 + ,17306 + ,17 + ,58 + ,66 + ,1597 + ,7953 + ,0 + ,4 + ,10 + ,207 + ,89455 + ,30 + ,47 + ,70 + ,1645 + ,147866 + ,37 + ,109 + ,103 + ,2429 + ,4245 + ,0 + ,7 + ,5 + ,151 + ,21509 + ,5 + ,12 + ,20 + ,474 + ,7670 + ,1 + ,0 + ,5 + ,141 + ,66675 + ,16 + ,37 + ,36 + ,1639 + ,14336 + ,32 + ,37 + ,34 + ,872 + ,53608 + ,24 + ,46 + ,48 + ,1318 + ,30059 + ,17 + ,15 + ,40 + ,1018 + ,29668 + ,11 + ,42 + ,43 + ,1383 + ,22097 + ,24 + ,7 + ,31 + ,1314 + ,96841 + ,22 + ,54 + ,42 + ,1335 + ,41907 + ,12 + ,54 + ,46 + ,1403 + ,27080 + ,19 + ,14 + ,33 + ,910 + ,35885 + ,13 + ,16 + ,18 + ,616 + ,41247 + ,17 + ,33 + ,55 + ,1407 + ,28313 + ,15 + ,32 + ,35 + ,771 + ,36845 + ,16 + ,21 + ,59 + ,766 + ,16548 + ,24 + ,15 + ,19 + ,473 + ,36134 + ,15 + ,38 + ,66 + ,1376 + ,55764 + ,17 + ,22 + ,60 + ,1232 + ,28910 + ,18 + ,28 + ,36 + ,1521 + ,13339 + ,20 + ,10 + ,25 + ,572 + ,25319 + ,16 + ,31 + ,47 + ,1059 + ,66956 + ,16 + ,32 + ,54 + ,1544 + ,47487 + ,18 + ,32 + ,53 + ,1230 + ,52785 + ,22 + ,43 + ,40 + ,1206 + ,44683 + ,8 + ,27 + ,40 + ,1205 + ,35619 + ,17 + ,37 + ,39 + ,1255 + ,21920 + ,18 + ,20 + ,14 + ,613 + ,45608 + ,16 + ,32 + ,45 + ,721 + ,7721 + ,23 + ,0 + ,36 + ,1109 + ,20634 + ,22 + ,5 + ,28 + ,740 + ,29788 + ,13 + ,26 + ,44 + ,1126 + ,31931 + ,13 + ,10 + ,30 + ,728 + ,37754 + ,16 + ,27 + ,22 + ,689 + ,32505 + ,16 + ,11 + ,17 + ,592 + ,40557 + ,20 + ,29 + ,31 + ,995 + ,94238 + ,22 + ,25 + ,55 + ,1613 + ,44197 + ,17 + ,55 + ,54 + ,2048 + ,43228 + ,18 + ,23 + ,21 + ,705 + ,4103 + ,17 + ,5 + ,14 + ,301 + ,44144 + ,12 + ,43 + ,81 + ,1803 + ,32868 + ,7 + ,23 + ,35 + ,799 + ,27640 + ,17 + ,34 + ,43 + ,861 + ,14063 + ,14 + ,36 + ,46 + ,1186 + ,28990 + ,23 + ,35 + ,30 + ,1451 + ,4694 + ,17 + ,0 + ,23 + ,628 + ,42648 + ,14 + ,37 + ,38 + ,1161 + ,64329 + ,15 + ,28 + ,54 + ,1463 + ,21928 + ,17 + ,16 + ,20 + ,742 + ,25836 + ,21 + ,26 + ,53 + ,979 + ,22779 + ,18 + ,38 + ,45 + ,675 + ,40820 + ,18 + ,23 + ,39 + ,1241 + ,27530 + ,17 + ,22 + ,20 + ,676 + ,32378 + ,17 + ,30 + ,24 + ,1049 + ,10824 + ,16 + ,16 + ,31 + ,620 + ,39613 + ,15 + ,18 + ,35 + ,1081 + ,60865 + ,21 + ,28 + ,151 + ,1688 + ,19787 + ,16 + ,32 + ,52 + ,736 + ,20107 + ,14 + ,21 + ,30 + ,617 + ,36605 + ,15 + ,23 + ,31 + ,812 + ,40961 + ,17 + ,29 + ,29 + ,1051 + ,48231 + ,15 + ,50 + ,57 + ,1656 + ,39725 + ,15 + ,12 + ,40 + ,705 + ,21455 + ,10 + ,21 + ,44 + ,945 + ,23430 + ,6 + ,18 + ,25 + ,554 + ,62991 + ,22 + ,27 + ,77 + ,1597 + ,49363 + ,21 + ,41 + ,35 + ,982 + ,9604 + ,1 + ,13 + ,11 + ,222 + ,24552 + ,18 + ,12 + ,63 + ,1212 + ,31493 + ,17 + ,21 + ,44 + ,1143 + ,3439 + ,4 + ,8 + ,19 + ,435 + ,19555 + ,10 + ,26 + ,13 + ,532 + ,21228 + ,16 + ,27 + ,42 + ,882 + ,23177 + ,16 + ,13 + ,38 + ,608 + ,22094 + ,9 + ,16 + ,29 + ,459 + ,2342 + ,16 + ,2 + ,20 + ,578 + ,38798 + ,17 + ,42 + ,27 + ,826 + ,3255 + ,7 + ,5 + ,20 + ,509 + ,24261 + ,15 + ,37 + ,19 + ,717 + ,18511 + ,14 + ,17 + ,37 + ,637 + ,40798 + ,14 + ,38 + ,26 + ,857 + ,28893 + ,18 + ,37 + ,42 + ,830 + ,21425 + ,12 + ,29 + ,49 + ,652 + ,50276 + ,16 + ,32 + ,30 + ,707 + ,37643 + ,21 + ,35 + ,49 + ,954 + ,30377 + ,19 + ,17 + ,67 + ,1461 + ,27126 + ,16 + ,20 + ,28 + ,672 + ,13 + ,1 + ,7 + ,19 + ,778 + ,42097 + ,16 + ,46 + ,49 + ,1141 + ,24451 + ,10 + ,24 + ,27 + ,680 + ,14335 + ,19 + ,40 + ,30 + ,1090 + ,5084 + ,12 + ,3 + ,22 + ,616 + ,9927 + ,2 + ,10 + ,12 + ,285 + ,43527 + ,14 + ,37 + ,31 + ,1145 + ,27184 + ,17 + ,17 + ,20 + ,733 + ,21610 + ,19 + ,28 + ,20 + ,888 + ,20484 + ,14 + ,19 + ,39 + ,849 + ,20156 + ,11 + ,29 + ,29 + ,1182 + ,6012 + ,4 + ,8 + ,16 + ,528 + ,18475 + ,16 + ,10 + ,27 + ,642 + ,12645 + ,20 + ,15 + ,21 + ,947 + ,11017 + ,12 + ,15 + ,19 + ,819 + ,37623 + ,15 + ,28 + ,35 + ,757 + ,35873 + ,16 + ,17 + ,14 + ,894) + ,dim=c(5 + ,289) + ,dimnames=list(c('Time' + ,'Reviews' + ,'Blogs' + ,'Logins' + ,'Pageviews') + ,1:289)) > y <- array(NA,dim=c(5,289),dimnames=list(c('Time','Reviews','Blogs','Logins','Pageviews'),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 = '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] "Time" > x[,par1] [1] 146283 98364 86146 96933 79234 42551 195663 6853 21529 95757 [11] 85584 143983 75851 59238 93163 96037 151511 136368 112642 94728 [21] 105499 121527 127766 98958 77900 85646 98579 130767 131741 53907 [31] 178812 146761 82036 163253 27032 171975 65990 86572 159676 1929 [41] 85371 58391 31580 136815 120642 69107 50495 108016 46341 78348 [51] 79336 56968 93176 161632 87850 127969 15049 155135 25109 45824 [61] 102996 160604 158051 44547 162647 174141 60622 179566 184301 75661 [71] 96144 129847 117286 71180 109377 85298 73631 86767 23824 93487 [81] 82981 73815 94552 132190 128754 66363 67808 61724 131722 68580 [91] 106175 55792 25157 76669 57283 105805 129484 72413 87831 96971 [101] 71299 77494 120336 93913 136048 181248 146123 32036 186646 102255 [111] 168237 64219 19630 76825 115338 109427 118168 84845 153197 29877 [121] 63506 22445 47695 68370 146304 38233 42071 50517 103950 5841 [131] 2341 84396 24610 35753 55515 209056 6622 115814 11609 13155 [141] 18274 72875 10112 142775 68847 17659 20112 61023 13983 65176 [151] 132432 112494 45109 170875 180759 214921 100226 32043 54454 78876 [161] 170745 6940 49025 122037 53782 127748 86839 44830 77395 89324 [171] 103300 112283 10901 120691 58106 57140 122422 25899 139296 52678 [181] 23853 17306 7953 89455 147866 4245 21509 7670 66675 14336 [191] 53608 30059 29668 22097 96841 41907 27080 35885 41247 28313 [201] 36845 16548 36134 55764 28910 13339 25319 66956 47487 52785 [211] 44683 35619 21920 45608 7721 20634 29788 31931 37754 32505 [221] 40557 94238 44197 43228 4103 44144 32868 27640 14063 28990 [231] 4694 42648 64329 21928 25836 22779 40820 27530 32378 10824 [241] 39613 60865 19787 20107 36605 40961 48231 39725 21455 23430 [251] 62991 49363 9604 24552 31493 3439 19555 21228 23177 22094 [261] 2342 38798 3255 24261 18511 40798 28893 21425 50276 37643 [271] 30377 27126 13 42097 24451 14335 5084 9927 43527 27184 [281] 21610 20484 20156 6012 18475 12645 11017 37623 35873 > 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]) 13 1929 2341 2342 3255 3439 4103 4245 4694 5084 5841 1 1 1 1 1 1 1 1 1 1 1 6012 6622 6853 6940 7670 7721 7953 9604 9927 10112 10824 1 1 1 1 1 1 1 1 1 1 1 10901 11017 11609 12645 13155 13339 13983 14063 14335 14336 15049 1 1 1 1 1 1 1 1 1 1 1 16548 17306 17659 18274 18475 18511 19555 19630 19787 20107 20112 1 1 1 1 1 1 1 1 1 1 1 20156 20484 20634 21228 21425 21455 21509 21529 21610 21920 21928 1 1 1 1 1 1 1 1 1 1 1 22094 22097 22445 22779 23177 23430 23824 23853 24261 24451 24552 1 1 1 1 1 1 1 1 1 1 1 24610 25109 25157 25319 25836 25899 27032 27080 27126 27184 27530 1 1 1 1 1 1 1 1 1 1 1 27640 28313 28893 28910 28990 29668 29788 29877 30059 30377 31493 1 1 1 1 1 1 1 1 1 1 1 31580 31931 32036 32043 32378 32505 32868 35619 35753 35873 35885 1 1 1 1 1 1 1 1 1 1 1 36134 36605 36845 37623 37643 37754 38233 38798 39613 39725 40557 1 1 1 1 1 1 1 1 1 1 1 40798 40820 40961 41247 41907 42071 42097 42551 42648 43228 43527 1 1 1 1 1 1 1 1 1 1 1 44144 44197 44547 44683 44830 45109 45608 45824 46341 47487 47695 1 1 1 1 1 1 1 1 1 1 1 48231 49025 49363 50276 50495 50517 52678 52785 53608 53782 53907 1 1 1 1 1 1 1 1 1 1 1 54454 55515 55764 55792 56968 57140 57283 58106 58391 59238 60622 1 1 1 1 1 1 1 1 1 1 1 60865 61023 61724 62991 63506 64219 64329 65176 65990 66363 66675 1 1 1 1 1 1 1 1 1 1 1 66956 67808 68370 68580 68847 69107 71180 71299 72413 72875 73631 1 1 1 1 1 1 1 1 1 1 1 73815 75661 75851 76669 76825 77395 77494 77900 78348 78876 79234 1 1 1 1 1 1 1 1 1 1 1 79336 82036 82981 84396 84845 85298 85371 85584 85646 86146 86572 1 1 1 1 1 1 1 1 1 1 1 86767 86839 87831 87850 89324 89455 93163 93176 93487 93913 94238 1 1 1 1 1 1 1 1 1 1 1 94552 94728 95757 96037 96144 96841 96933 96971 98364 98579 98958 1 1 1 1 1 1 1 1 1 1 1 100226 102255 102996 103300 103950 105499 105805 106175 108016 109377 109427 1 1 1 1 1 1 1 1 1 1 1 112283 112494 112642 115338 115814 117286 118168 120336 120642 120691 121527 1 1 1 1 1 1 1 1 1 1 1 122037 122422 127748 127766 127969 128754 129484 129847 130767 131722 131741 1 1 1 1 1 1 1 1 1 1 1 132190 132432 136048 136368 136815 139296 142775 143983 146123 146283 146304 1 1 1 1 1 1 1 1 1 1 1 146761 147866 151511 153197 155135 158051 159676 160604 161632 162647 163253 1 1 1 1 1 1 1 1 1 1 1 168237 170745 170875 171975 174141 178812 179566 180759 181248 184301 186646 1 1 1 1 1 1 1 1 1 1 1 195663 209056 214921 1 1 1 > colnames(x) [1] "Time" "Reviews" "Blogs" "Logins" "Pageviews" > colnames(x)[par1] [1] "Time" > x[,par1] [1] 146283 98364 86146 96933 79234 42551 195663 6853 21529 95757 [11] 85584 143983 75851 59238 93163 96037 151511 136368 112642 94728 [21] 105499 121527 127766 98958 77900 85646 98579 130767 131741 53907 [31] 178812 146761 82036 163253 27032 171975 65990 86572 159676 1929 [41] 85371 58391 31580 136815 120642 69107 50495 108016 46341 78348 [51] 79336 56968 93176 161632 87850 127969 15049 155135 25109 45824 [61] 102996 160604 158051 44547 162647 174141 60622 179566 184301 75661 [71] 96144 129847 117286 71180 109377 85298 73631 86767 23824 93487 [81] 82981 73815 94552 132190 128754 66363 67808 61724 131722 68580 [91] 106175 55792 25157 76669 57283 105805 129484 72413 87831 96971 [101] 71299 77494 120336 93913 136048 181248 146123 32036 186646 102255 [111] 168237 64219 19630 76825 115338 109427 118168 84845 153197 29877 [121] 63506 22445 47695 68370 146304 38233 42071 50517 103950 5841 [131] 2341 84396 24610 35753 55515 209056 6622 115814 11609 13155 [141] 18274 72875 10112 142775 68847 17659 20112 61023 13983 65176 [151] 132432 112494 45109 170875 180759 214921 100226 32043 54454 78876 [161] 170745 6940 49025 122037 53782 127748 86839 44830 77395 89324 [171] 103300 112283 10901 120691 58106 57140 122422 25899 139296 52678 [181] 23853 17306 7953 89455 147866 4245 21509 7670 66675 14336 [191] 53608 30059 29668 22097 96841 41907 27080 35885 41247 28313 [201] 36845 16548 36134 55764 28910 13339 25319 66956 47487 52785 [211] 44683 35619 21920 45608 7721 20634 29788 31931 37754 32505 [221] 40557 94238 44197 43228 4103 44144 32868 27640 14063 28990 [231] 4694 42648 64329 21928 25836 22779 40820 27530 32378 10824 [241] 39613 60865 19787 20107 36605 40961 48231 39725 21455 23430 [251] 62991 49363 9604 24552 31493 3439 19555 21228 23177 22094 [261] 2342 38798 3255 24261 18511 40798 28893 21425 50276 37643 [271] 30377 27126 13 42097 24451 14335 5084 9927 43527 27184 [281] 21610 20484 20156 6012 18475 12645 11017 37623 35873 > 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/19x241324411625.tab") + } + } > m Conditional inference tree with 11 terminal nodes Response: Time Inputs: Reviews, Blogs, Logins, Pageviews Number of observations: 289 1) Blogs <= 49; criterion = 1, statistic = 203.257 2) Blogs <= 21; criterion = 1, statistic = 59.804 3) Blogs <= 8; criterion = 1, statistic = 20.853 4) Reviews <= 16; criterion = 0.956, statistic = 6.446 5)* weights = 13 4) Reviews > 16 6)* weights = 8 3) Blogs > 8 7) Logins <= 39; criterion = 0.989, statistic = 8.986 8)* weights = 32 7) Logins > 39 9)* weights = 11 2) Blogs > 21 10) Reviews <= 21; criterion = 1, statistic = 18.006 11) Pageviews <= 1407; criterion = 0.978, statistic = 7.7 12)* weights = 58 11) Pageviews > 1407 13)* weights = 14 10) Reviews > 21 14)* weights = 30 1) Blogs > 49 15) Blogs <= 77; criterion = 1, statistic = 36.222 16) Reviews <= 22; criterion = 0.996, statistic = 10.613 17)* weights = 13 16) Reviews > 22 18)* weights = 38 15) Blogs > 77 19) Pageviews <= 1644; criterion = 1, statistic = 15.193 20)* weights = 17 19) Pageviews > 1644 21)* weights = 55 > postscript(file="/var/www/rcomp/tmp/2cfmd1324411625.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/3abo71324411625.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 146283 96808.647 49474.35294 2 98364 94531.658 3832.34211 3 86146 94531.658 -8385.65789 4 96933 139468.382 -42535.38182 5 79234 62495.733 16738.26667 6 42551 14845.625 27705.37500 7 195663 139468.382 56194.61818 8 6853 14845.625 -7992.62500 9 21529 32373.364 -10844.36364 10 95757 62495.733 33261.26667 11 85584 94531.658 -8947.65789 12 143983 139468.382 4514.61818 13 75851 96808.647 -20957.64706 14 59238 62495.733 -3257.73333 15 93163 139468.382 -46305.38182 16 96037 94531.658 1505.34211 17 151511 139468.382 12042.61818 18 136368 139468.382 -3100.38182 19 112642 94531.658 18110.34211 20 94728 96808.647 -2080.64706 21 105499 139468.382 -33969.38182 22 121527 139468.382 -17941.38182 23 127766 139468.382 -11702.38182 24 98958 94531.658 4426.34211 25 77900 96808.647 -18908.64706 26 85646 139468.382 -53822.38182 27 98579 94531.658 4047.34211 28 130767 139468.382 -8701.38182 29 131741 96808.647 34932.35294 30 53907 62495.733 -8588.73333 31 178812 139468.382 39343.61818 32 146761 139468.382 7292.61818 33 82036 62495.733 19540.26667 34 163253 139468.382 23784.61818 35 27032 62495.733 -35463.73333 36 171975 139468.382 32506.61818 37 65990 35565.828 30424.17241 38 86572 94531.658 -7959.65789 39 159676 139468.382 20207.61818 40 1929 5073.385 -3144.38462 41 85371 94531.658 -9160.65789 42 58391 35565.828 22825.17241 43 31580 49466.429 -17886.42857 44 136815 139468.382 -2653.38182 45 120642 139468.382 -18826.38182 46 69107 94531.658 -25424.65789 47 50495 60512.615 -10017.61538 48 108016 94531.658 13484.34211 49 46341 62495.733 -16154.73333 50 78348 62495.733 15852.26667 51 79336 94531.658 -15195.65789 52 56968 32373.364 24594.63636 53 93176 139468.382 -46292.38182 54 161632 139468.382 22163.61818 55 87850 139468.382 -51618.38182 56 127969 94531.658 33437.34211 57 15049 5073.385 9975.61538 58 155135 139468.382 15666.61818 59 25109 20281.344 4827.65625 60 45824 35565.828 10258.17241 61 102996 94531.658 8464.34211 62 160604 139468.382 21135.61818 63 158051 139468.382 18582.61818 64 44547 35565.828 8981.17241 65 162647 139468.382 23178.61818 66 174141 139468.382 34672.61818 67 60622 94531.658 -33909.65789 68 179566 139468.382 40097.61818 69 184301 139468.382 44832.61818 70 75661 94531.658 -18870.65789 71 96144 94531.658 1612.34211 72 129847 62495.733 67351.26667 73 117286 94531.658 22754.34211 74 71180 94531.658 -23351.65789 75 109377 94531.658 14845.34211 76 85298 139468.382 -54170.38182 77 73631 96808.647 -23177.64706 78 86767 94531.658 -7764.65789 79 23824 62495.733 -38671.73333 80 93487 94531.658 -1044.65789 81 82981 94531.658 -11550.65789 82 73815 96808.647 -22993.64706 83 94552 139468.382 -44916.38182 84 132190 139468.382 -7278.38182 85 128754 94531.658 34222.34211 86 66363 96808.647 -30445.64706 87 67808 94531.658 -26723.65789 88 61724 60512.615 1211.38462 89 131722 139468.382 -7746.38182 90 68580 62495.733 6084.26667 91 106175 96808.647 9366.35294 92 55792 35565.828 20226.17241 93 25157 62495.733 -37338.73333 94 76669 94531.658 -17862.65789 95 57283 35565.828 21717.17241 96 105805 94531.658 11273.34211 97 129484 94531.658 34952.34211 98 72413 139468.382 -67055.38182 99 87831 94531.658 -6700.65789 100 96971 96808.647 162.35294 101 71299 62495.733 8803.26667 102 77494 139468.382 -61974.38182 103 120336 94531.658 25804.34211 104 93913 94531.658 -618.65789 105 136048 96808.647 39239.35294 106 181248 139468.382 41779.61818 107 146123 139468.382 6654.61818 108 32036 35565.828 -3529.82759 109 186646 139468.382 47177.61818 110 102255 139468.382 -37213.38182 111 168237 139468.382 28768.61818 112 64219 62495.733 1723.26667 113 19630 20281.344 -651.34375 114 76825 60512.615 16312.38462 115 115338 96808.647 18529.35294 116 109427 139468.382 -30041.38182 117 118168 139468.382 -21300.38182 118 84845 60512.615 24332.38462 119 153197 62495.733 90701.26667 120 29877 49466.429 -19589.42857 121 63506 60512.615 2993.38462 122 22445 35565.828 -13120.82759 123 47695 49466.429 -1771.42857 124 68370 96808.647 -28438.64706 125 146304 94531.658 51772.34211 126 38233 35565.828 2667.17241 127 42071 35565.828 6505.17241 128 50517 60512.615 -9995.61538 129 103950 139468.382 -35518.38182 130 5841 20281.344 -14440.34375 131 2341 5073.385 -2732.38462 132 84396 96808.647 -12412.64706 133 24610 35565.828 -10955.82759 134 35753 62495.733 -26742.73333 135 55515 94531.658 -39016.65789 136 209056 139468.382 69587.61818 137 6622 5073.385 1548.61538 138 115814 94531.658 21282.34211 139 11609 20281.344 -8672.34375 140 13155 20281.344 -7126.34375 141 18274 32373.364 -14099.36364 142 72875 60512.615 12362.38462 143 10112 14845.625 -4733.62500 144 142775 139468.382 3306.61818 145 68847 94531.658 -25684.65789 146 17659 62495.733 -44836.73333 147 20112 62495.733 -42383.73333 148 61023 62495.733 -1472.73333 149 13983 20281.344 -6298.34375 150 65176 62495.733 2680.26667 151 132432 139468.382 -7036.38182 152 112494 62495.733 49998.26667 153 45109 49466.429 -4357.42857 154 170875 139468.382 31406.61818 155 180759 139468.382 41290.61818 156 214921 139468.382 75452.61818 157 100226 94531.658 5694.34211 158 32043 35565.828 -3522.82759 159 54454 62495.733 -8041.73333 160 78876 94531.658 -15655.65789 161 170745 139468.382 31276.61818 162 6940 20281.344 -13341.34375 163 49025 49466.429 -441.42857 164 122037 139468.382 -17431.38182 165 53782 62495.733 -8713.73333 166 127748 96808.647 30939.35294 167 86839 94531.658 -7692.65789 168 44830 32373.364 12456.63636 169 77395 60512.615 16882.38462 170 89324 49466.429 39857.57143 171 103300 139468.382 -36168.38182 172 112283 96808.647 15474.35294 173 10901 49466.429 -38565.42857 174 120691 139468.382 -18777.38182 175 58106 96808.647 -38702.64706 176 57140 49466.429 7673.57143 177 122422 139468.382 -17046.38182 178 25899 35565.828 -9666.82759 179 139296 139468.382 -172.38182 180 52678 35565.828 17112.17241 181 23853 35565.828 -11712.82759 182 17306 60512.615 -43206.61538 183 7953 5073.385 2879.61538 184 89455 62495.733 26959.26667 185 147866 139468.382 8397.61818 186 4245 5073.385 -828.38462 187 21509 20281.344 1227.65625 188 7670 5073.385 2596.61538 189 66675 49466.429 17208.57143 190 14336 62495.733 -48159.73333 191 53608 62495.733 -8887.73333 192 30059 32373.364 -2314.36364 193 29668 35565.828 -5897.82759 194 22097 14845.625 7251.37500 195 96841 60512.615 36328.38462 196 41907 60512.615 -18605.61538 197 27080 20281.344 6798.65625 198 35885 20281.344 15603.65625 199 41247 35565.828 5681.17241 200 28313 35565.828 -7252.82759 201 36845 32373.364 4471.63636 202 16548 20281.344 -3733.34375 203 36134 35565.828 568.17241 204 55764 35565.828 20198.17241 205 28910 49466.429 -20556.42857 206 13339 20281.344 -6942.34375 207 25319 35565.828 -10246.82759 208 66956 49466.429 17489.57143 209 47487 35565.828 11921.17241 210 52785 62495.733 -9710.73333 211 44683 35565.828 9117.17241 212 35619 35565.828 53.17241 213 21920 20281.344 1638.65625 214 45608 35565.828 10042.17241 215 7721 14845.625 -7124.62500 216 20634 14845.625 5788.37500 217 29788 35565.828 -5777.82759 218 31931 20281.344 11649.65625 219 37754 35565.828 2188.17241 220 32505 20281.344 12223.65625 221 40557 35565.828 4991.17241 222 94238 62495.733 31742.26667 223 44197 60512.615 -16315.61538 224 43228 35565.828 7662.17241 225 4103 14845.625 -10742.62500 226 44144 49466.429 -5322.42857 227 32868 35565.828 -2697.82759 228 27640 35565.828 -7925.82759 229 14063 35565.828 -21502.82759 230 28990 62495.733 -33505.73333 231 4694 14845.625 -10151.62500 232 42648 35565.828 7082.17241 233 64329 49466.429 14862.57143 234 21928 20281.344 1646.65625 235 25836 35565.828 -9729.82759 236 22779 35565.828 -12786.82759 237 40820 35565.828 5254.17241 238 27530 35565.828 -8035.82759 239 32378 35565.828 -3187.82759 240 10824 20281.344 -9457.34375 241 39613 20281.344 19331.65625 242 60865 49466.429 11398.57143 243 19787 35565.828 -15778.82759 244 20107 20281.344 -174.34375 245 36605 35565.828 1039.17241 246 40961 35565.828 5395.17241 247 48231 60512.615 -12281.61538 248 39725 32373.364 7351.63636 249 21455 32373.364 -10918.36364 250 23430 20281.344 3148.65625 251 62991 62495.733 495.26667 252 49363 35565.828 13797.17241 253 9604 20281.344 -10677.34375 254 24552 32373.364 -7821.36364 255 31493 32373.364 -880.36364 256 3439 5073.385 -1634.38462 257 19555 35565.828 -16010.82759 258 21228 35565.828 -14337.82759 259 23177 20281.344 2895.65625 260 22094 20281.344 1812.65625 261 2342 5073.385 -2731.38462 262 38798 35565.828 3232.17241 263 3255 5073.385 -1818.38462 264 24261 35565.828 -11304.82759 265 18511 20281.344 -1770.34375 266 40798 35565.828 5232.17241 267 28893 35565.828 -6672.82759 268 21425 35565.828 -14140.82759 269 50276 35565.828 14710.17241 270 37643 35565.828 2077.17241 271 30377 32373.364 -1996.36364 272 27126 20281.344 6844.65625 273 13 5073.385 -5060.38462 274 42097 35565.828 6531.17241 275 24451 35565.828 -11114.82759 276 14335 35565.828 -21230.82759 277 5084 5073.385 10.61538 278 9927 20281.344 -10354.34375 279 43527 35565.828 7961.17241 280 27184 20281.344 6902.65625 281 21610 35565.828 -13955.82759 282 20484 20281.344 202.65625 283 20156 35565.828 -15409.82759 284 6012 5073.385 938.61538 285 18475 20281.344 -1806.34375 286 12645 20281.344 -7636.34375 287 11017 20281.344 -9264.34375 288 37623 35565.828 2057.17241 289 35873 20281.344 15591.65625 > 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/44bi01324411625.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/5huva1324411625.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/6jm901324411626.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/75kx71324411626.tab") + } > > try(system("convert tmp/2cfmd1324411625.ps tmp/2cfmd1324411625.png",intern=TRUE)) character(0) > try(system("convert tmp/3abo71324411625.ps tmp/3abo71324411625.png",intern=TRUE)) character(0) > try(system("convert tmp/44bi01324411625.ps tmp/44bi01324411625.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.810 0.120 4.917