R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(1418 + ,210907 + ,56 + ,3 + ,79 + ,30 + ,115 + ,112285 + ,24188 + ,144 + ,145 + ,869 + ,120982 + ,56 + ,4 + ,58 + ,28 + ,109 + ,84786 + ,18273 + ,103 + ,101 + ,1530 + ,176508 + ,54 + ,12 + ,60 + ,38 + ,146 + ,83123 + ,14130 + ,98 + ,98 + ,2172 + ,179321 + ,89 + ,2 + ,108 + ,30 + ,116 + ,101193 + ,32287 + ,135 + ,132 + ,901 + ,123185 + ,40 + ,1 + ,49 + ,22 + ,68 + ,38361 + ,8654 + ,61 + ,60 + ,463 + ,52746 + ,25 + ,3 + ,0 + ,26 + ,101 + ,68504 + ,9245 + ,39 + ,38 + ,3201 + ,385534 + ,92 + ,0 + ,121 + ,25 + ,96 + ,119182 + ,33251 + ,150 + ,144 + ,371 + ,33170 + ,18 + ,0 + ,1 + ,18 + ,67 + ,22807 + ,1271 + ,5 + ,5 + ,1192 + ,101645 + ,63 + ,0 + ,20 + ,11 + ,44 + ,17140 + ,5279 + ,28 + ,28 + ,1583 + ,149061 + ,44 + ,5 + ,43 + ,26 + ,100 + ,116174 + ,27101 + ,84 + ,84 + ,1439 + ,165446 + ,33 + ,0 + ,69 + ,25 + ,93 + ,57635 + ,16373 + ,80 + ,79 + ,1764 + ,237213 + ,84 + ,0 + ,78 + ,38 + ,140 + ,66198 + ,19716 + ,130 + ,127 + ,1495 + ,173326 + ,88 + ,7 + ,86 + ,44 + ,166 + ,71701 + ,17753 + ,82 + ,78 + ,1373 + ,133131 + ,55 + ,7 + ,44 + ,30 + ,99 + ,57793 + ,9028 + ,60 + ,60 + ,2187 + ,258873 + ,60 + ,3 + ,104 + ,40 + ,139 + ,80444 + ,18653 + ,131 + ,131 + ,1491 + ,180083 + ,66 + ,9 + ,63 + ,34 + ,130 + ,53855 + ,8828 + ,84 + ,84 + ,4041 + ,324799 + ,154 + ,0 + ,158 + ,47 + ,181 + ,97668 + ,29498 + ,140 + ,133 + ,1706 + ,230964 + ,53 + ,4 + ,102 + ,30 + ,116 + ,133824 + ,27563 + ,151 + ,150 + ,2152 + ,236785 + ,119 + ,3 + ,77 + ,31 + ,116 + ,101481 + ,18293 + ,91 + ,91 + ,1036 + ,135473 + ,41 + ,0 + ,82 + ,23 + ,88 + ,99645 + ,22530 + ,138 + ,132 + ,1882 + ,202925 + ,61 + ,7 + ,115 + ,36 + ,139 + ,114789 + ,15977 + ,150 + ,136 + ,1929 + ,215147 + ,58 + ,0 + ,101 + ,36 + ,135 + ,99052 + ,35082 + ,124 + ,124 + ,2242 + ,344297 + ,75 + ,1 + ,80 + ,30 + ,108 + ,67654 + ,16116 + ,119 + ,118 + ,1220 + ,153935 + ,33 + ,5 + ,50 + ,25 + ,89 + ,65553 + ,15849 + ,73 + ,70 + ,1289 + ,132943 + ,40 + ,7 + ,83 + ,39 + ,156 + ,97500 + ,16026 + ,110 + ,107 + ,2515 + ,174724 + ,92 + ,0 + ,123 + ,34 + ,129 + ,69112 + ,26569 + ,123 + ,119 + ,2147 + ,174415 + ,100 + ,0 + ,73 + ,31 + ,118 + ,82753 + ,24785 + ,90 + ,89 + ,2352 + ,225548 + ,112 + ,5 + ,81 + ,31 + ,118 + ,85323 + ,17569 + ,116 + ,112 + ,1638 + ,223632 + ,73 + ,0 + ,105 + ,33 + ,125 + ,72654 + ,23825 + ,113 + ,108 + ,1222 + ,124817 + ,40 + ,0 + ,47 + ,25 + ,95 + ,30727 + ,7869 + ,56 + ,52 + ,1812 + ,221698 + ,45 + ,0 + ,105 + ,33 + ,126 + ,77873 + ,14975 + ,115 + ,112 + ,1677 + ,210767 + ,60 + ,3 + ,94 + ,35 + ,135 + ,117478 + ,37791 + ,119 + ,116 + ,1579 + ,170266 + ,62 + ,4 + ,44 + ,42 + ,154 + ,74007 + ,9605 + ,129 + ,123 + ,1731 + ,260561 + ,75 + ,1 + ,114 + ,43 + ,165 + ,90183 + ,27295 + ,127 + ,125 + ,807 + ,84853 + ,31 + ,4 + ,38 + ,30 + ,113 + ,61542 + ,2746 + ,27 + ,27 + ,2452 + ,294424 + ,77 + ,2 + ,107 + ,33 + ,127 + ,101494 + ,34461 + ,175 + ,162 + ,829 + ,101011 + ,34 + ,0 + ,30 + ,13 + ,52 + ,27570 + ,8098 + ,35 + ,32 + ,1940 + ,215641 + ,46 + ,0 + ,71 + ,32 + ,121 + ,55813 + ,4787 + ,64 + ,64 + ,2662 + ,325107 + ,99 + ,0 + ,84 + ,36 + ,136 + ,79215 + ,24919 + ,96 + ,92 + ,186 + ,7176 + ,17 + ,0 + ,0 + ,0 + ,0 + ,1423 + ,603 + ,0 + ,0 + ,1499 + ,167542 + ,66 + ,2 + ,59 + ,28 + ,108 + ,55461 + ,16329 + ,84 + ,83 + ,865 + ,106408 + ,30 + ,1 + ,33 + ,14 + ,46 + ,31081 + ,12558 + ,41 + ,41 + ,1793 + ,96560 + ,76 + ,0 + ,42 + ,17 + ,54 + ,22996 + ,7784 + ,47 + ,47 + ,2527 + ,265769 + ,146 + ,2 + ,96 + ,32 + ,124 + ,83122 + ,28522 + ,126 + ,120 + ,2747 + ,269651 + ,67 + ,10 + ,106 + ,30 + ,115 + ,70106 + ,22265 + ,105 + ,105 + ,1324 + ,149112 + ,56 + ,6 + ,56 + ,35 + ,128 + ,60578 + ,14459 + ,80 + ,79 + ,2702 + ,175824 + ,107 + ,0 + ,57 + ,20 + ,80 + ,39992 + ,14526 + ,70 + ,65 + ,1383 + ,152871 + ,58 + ,5 + ,59 + ,28 + ,97 + ,79892 + ,22240 + ,73 + ,70 + ,1179 + ,111665 + ,34 + ,4 + ,39 + ,28 + ,104 + ,49810 + ,11802 + ,57 + ,55 + ,2099 + ,116408 + ,61 + ,1 + ,34 + ,39 + ,59 + ,71570 + ,7623 + ,40 + ,39 + ,4308 + ,362301 + ,119 + ,2 + ,76 + ,34 + ,125 + ,100708 + ,11912 + ,68 + ,67 + ,918 + ,78800 + ,42 + ,2 + ,20 + ,26 + ,82 + ,33032 + ,7935 + ,21 + ,21 + ,1831 + ,183167 + ,66 + ,0 + ,91 + ,39 + ,149 + ,82875 + ,18220 + ,127 + ,127 + ,3373 + ,277965 + ,89 + ,8 + ,115 + ,39 + ,149 + ,139077 + ,19199 + ,154 + ,152 + ,1713 + ,150629 + ,44 + ,3 + ,85 + ,33 + ,122 + ,71595 + ,19918 + ,116 + ,113 + ,1438 + ,168809 + ,66 + ,0 + ,76 + ,28 + ,118 + ,72260 + ,21884 + ,102 + ,99 + ,496 + ,24188 + ,24 + ,0 + ,8 + ,4 + ,12 + ,5950 + ,2694 + ,7 + ,7 + ,2253 + ,329267 + ,259 + ,8 + ,79 + ,39 + ,144 + ,115762 + ,15808 + ,148 + ,141 + ,744 + ,65029 + ,17 + ,5 + ,21 + ,18 + ,67 + ,32551 + ,3597 + ,21 + ,21 + ,1161 + ,101097 + ,64 + ,3 + ,30 + ,14 + ,52 + ,31701 + ,5296 + ,35 + ,35 + ,2352 + ,218946 + ,41 + ,1 + ,76 + ,29 + ,108 + ,80670 + ,25239 + ,112 + ,109 + ,2144 + ,244052 + ,68 + ,5 + ,101 + ,44 + ,166 + ,143558 + ,29801 + ,137 + ,133 + ,4691 + ,341570 + ,168 + ,1 + ,94 + ,21 + ,80 + ,117105 + ,18450 + ,135 + ,123 + ,1112 + ,103597 + ,43 + ,1 + ,27 + ,16 + ,60 + ,23789 + ,7132 + ,26 + ,26 + ,2694 + ,233328 + ,132 + ,5 + ,92 + ,28 + ,107 + ,120733 + ,34861 + ,230 + ,230 + ,1973 + ,256462 + ,105 + ,0 + ,123 + ,35 + ,127 + ,105195 + ,35940 + ,181 + ,166 + ,1769 + ,206161 + ,71 + ,12 + ,75 + ,28 + ,107 + ,73107 + ,16688 + ,71 + ,68 + ,3148 + ,311473 + ,112 + ,8 + ,128 + ,38 + ,146 + ,132068 + ,24683 + ,147 + ,147 + ,2474 + ,235800 + ,94 + ,8 + ,105 + ,23 + ,84 + ,149193 + ,46230 + ,190 + ,179 + ,2084 + ,177939 + ,82 + ,8 + ,55 + ,36 + ,141 + ,46821 + ,10387 + ,64 + ,61 + ,1954 + ,207176 + ,70 + ,8 + ,56 + ,32 + ,123 + ,87011 + ,21436 + ,105 + ,101 + ,1226 + ,196553 + ,57 + ,2 + ,41 + ,29 + ,111 + ,95260 + ,30546 + ,107 + ,108 + ,1389 + ,174184 + ,53 + ,0 + ,72 + ,25 + ,98 + ,55183 + ,19746 + ,94 + ,90 + ,1496 + ,143246 + ,103 + ,5 + ,67 + ,27 + ,105 + ,106671 + ,15977 + ,116 + ,114 + ,2269 + ,187559 + ,121 + ,8 + ,75 + ,36 + ,135 + ,73511 + ,22583 + ,106 + ,103 + ,1833 + ,187681 + ,62 + ,2 + ,114 + ,28 + ,107 + ,92945 + ,17274 + ,143 + ,142 + ,1268 + ,119016 + ,52 + ,5 + ,118 + ,23 + ,85 + ,78664 + ,16469 + ,81 + ,79 + ,1943 + ,182192 + ,52 + ,12 + ,77 + ,40 + ,155 + ,70054 + ,14251 + ,89 + ,88 + ,893 + ,73566 + ,32 + ,6 + ,22 + ,23 + ,88 + ,22618 + ,3007 + ,26 + ,25 + ,1762 + ,194979 + ,62 + ,7 + ,66 + ,40 + ,155 + ,74011 + ,16851 + ,84 + ,83 + ,1403 + ,167488 + ,45 + ,2 + ,69 + ,28 + ,104 + ,83737 + ,21113 + ,113 + ,113 + ,1425 + ,143756 + ,46 + ,0 + ,105 + ,34 + ,132 + ,69094 + ,17401 + ,120 + ,118 + ,1857 + ,275541 + ,63 + ,4 + ,116 + ,33 + ,127 + ,93133 + ,23958 + ,110 + ,110 + ,1840 + ,243199 + ,75 + ,3 + ,88 + ,28 + ,108 + ,95536 + ,23567 + ,134 + ,129 + ,1502 + ,182999 + ,88 + ,6 + ,73 + ,34 + ,129 + ,225920 + ,13065 + ,54 + ,51 + ,1441 + ,135649 + ,46 + ,2 + ,99 + ,30 + ,116 + ,62133 + ,15358 + ,96 + ,93 + ,1420 + ,152299 + ,53 + ,0 + ,62 + ,33 + ,122 + ,61370 + ,14587 + ,78 + ,76 + ,1416 + ,120221 + ,37 + ,1 + ,53 + ,22 + ,85 + ,43836 + ,12770 + ,51 + ,49 + ,2970 + ,346485 + ,90 + ,0 + ,118 + ,38 + ,147 + ,106117 + ,24021 + ,121 + ,118 + ,1317 + ,145790 + ,63 + ,5 + ,30 + ,26 + ,99 + ,38692 + ,9648 + ,38 + ,38 + ,1644 + ,193339 + ,78 + ,2 + ,100 + ,35 + ,87 + ,84651 + ,20537 + ,145 + ,141 + ,870 + ,80953 + ,25 + ,0 + ,49 + ,8 + ,28 + ,56622 + ,7905 + ,59 + ,58 + ,1654 + ,122774 + ,45 + ,0 + ,24 + ,24 + ,90 + ,15986 + ,4527 + ,27 + ,27 + ,1054 + ,130585 + ,46 + ,5 + ,67 + ,29 + ,109 + ,95364 + ,30495 + ,91 + ,91 + ,937 + ,112611 + ,41 + ,0 + ,46 + ,20 + ,78 + ,26706 + ,7117 + ,48 + ,48 + ,3004 + ,286468 + ,144 + ,1 + ,57 + ,29 + ,111 + ,89691 + ,17719 + ,68 + ,63 + ,2008 + ,241066 + ,82 + ,0 + ,75 + ,45 + ,158 + ,67267 + ,27056 + ,58 + ,56 + ,2547 + ,148446 + ,91 + ,1 + ,135 + ,37 + ,141 + ,126846 + ,33473 + ,150 + ,144 + ,1885 + ,204713 + ,71 + ,1 + ,68 + ,33 + ,122 + ,41140 + ,9758 + ,74 + ,73 + ,1626 + ,182079 + ,63 + ,2 + ,124 + ,33 + ,124 + ,102860 + ,21115 + ,181 + ,168 + ,1468 + ,140344 + ,53 + ,6 + ,33 + ,25 + ,93 + ,51715 + ,7236 + ,65 + ,64 + ,2445 + ,220516 + ,62 + ,1 + ,98 + ,32 + ,124 + ,55801 + ,13790 + ,97 + ,97 + ,1964 + ,243060 + ,63 + ,4 + ,58 + ,29 + ,112 + ,111813 + ,32902 + ,121 + ,117 + ,1381 + ,162765 + ,32 + ,2 + ,68 + ,28 + ,108 + ,120293 + ,25131 + ,99 + ,100 + ,1369 + ,182613 + ,39 + ,3 + ,81 + ,28 + ,99 + ,138599 + ,30910 + ,152 + ,149 + ,1659 + ,232138 + ,62 + ,0 + ,131 + ,31 + ,117 + ,161647 + ,35947 + ,188 + ,187 + ,2888 + ,265318 + ,117 + ,10 + ,110 + ,52 + ,199 + ,115929 + ,29848 + ,138 + ,127 + ,1290 + ,85574 + ,34 + ,0 + ,37 + ,21 + ,78 + ,24266 + ,6943 + ,40 + ,37 + ,2845 + ,310839 + ,92 + ,9 + ,130 + ,24 + ,91 + ,162901 + ,42705 + ,254 + ,245 + ,1982 + ,225060 + ,93 + ,7 + ,93 + ,41 + ,158 + ,109825 + ,31808 + ,87 + ,87 + ,1904 + ,232317 + ,54 + ,0 + ,118 + ,33 + ,126 + ,129838 + ,26675 + ,178 + ,177 + ,1391 + ,144966 + ,144 + ,0 + ,39 + ,32 + ,122 + ,37510 + ,8435 + ,51 + ,49 + ,602 + ,43287 + ,14 + ,4 + ,13 + ,19 + ,71 + ,43750 + ,7409 + ,49 + ,49 + ,1743 + ,155754 + ,61 + ,4 + ,74 + ,20 + ,75 + ,40652 + ,14993 + ,73 + ,73 + ,1559 + ,164709 + ,109 + ,0 + ,81 + ,31 + ,115 + ,87771 + ,36867 + ,176 + ,177 + ,2014 + ,201940 + ,38 + ,0 + ,109 + ,31 + ,119 + ,85872 + ,33835 + ,94 + ,94 + ,2143 + ,235454 + ,73 + ,0 + ,151 + ,32 + ,124 + ,89275 + ,24164 + ,120 + ,117 + ,2146 + ,220801 + ,75 + ,1 + ,51 + ,18 + ,72 + ,44418 + ,12607 + ,66 + ,60 + ,874 + ,99466 + ,50 + ,0 + ,28 + ,23 + ,91 + ,192565 + ,22609 + ,56 + ,55 + ,1590 + ,92661 + ,61 + ,1 + ,40 + ,17 + ,45 + ,35232 + ,5892 + ,39 + ,39 + ,1590 + ,133328 + ,55 + ,0 + ,56 + ,20 + ,78 + ,40909 + ,17014 + ,66 + ,64 + ,1210 + ,61361 + ,77 + ,0 + ,27 + ,12 + ,39 + ,13294 + ,5394 + ,27 + ,26 + ,2072 + ,125930 + ,75 + ,4 + ,37 + ,17 + ,68 + ,32387 + ,9178 + ,65 + ,64 + ,1281 + ,100750 + ,72 + ,0 + ,83 + ,30 + ,119 + ,140867 + ,6440 + ,58 + ,58 + ,1401 + ,224549 + ,50 + ,4 + ,54 + ,31 + ,117 + ,120662 + ,21916 + ,98 + ,95 + ,834 + ,82316 + ,32 + ,4 + ,27 + ,10 + ,39 + ,21233 + ,4011 + ,25 + ,25 + ,1105 + ,102010 + ,53 + ,3 + ,28 + ,13 + ,50 + ,44332 + ,5818 + ,26 + ,26 + ,1272 + ,101523 + ,42 + ,0 + ,59 + ,22 + ,88 + ,61056 + ,18647 + ,77 + ,76 + ,1944 + ,243511 + ,71 + ,0 + ,133 + ,42 + ,155 + ,101338 + ,20556 + ,130 + ,129 + ,391 + ,22938 + ,10 + ,0 + ,12 + ,1 + ,0 + ,1168 + ,238 + ,11 + ,11 + ,761 + ,41566 + ,35 + ,5 + ,0 + ,9 + ,36 + ,13497 + ,70 + ,2 + ,2 + ,1605 + ,152474 + ,65 + ,0 + ,106 + ,32 + ,123 + ,65567 + ,22392 + ,101 + ,101 + ,530 + ,61857 + ,25 + ,4 + ,23 + ,11 + ,32 + ,25162 + ,3913 + ,31 + ,28 + ,1988 + ,99923 + ,66 + ,0 + ,44 + ,25 + ,99 + ,32334 + ,12237 + ,36 + ,36 + ,1386 + ,132487 + ,41 + ,0 + ,71 + ,36 + ,136 + ,40735 + ,8388 + ,120 + ,89 + ,2395 + ,317394 + ,86 + ,1 + ,116 + ,31 + ,117 + ,91413 + ,22120 + ,195 + ,193 + ,387 + ,21054 + ,16 + ,0 + ,4 + ,0 + ,0 + ,855 + ,338 + ,4 + ,4 + ,1742 + ,209641 + ,42 + ,5 + ,62 + ,24 + ,88 + ,97068 + ,11727 + ,89 + ,84 + ,620 + ,22648 + ,19 + ,0 + ,12 + ,13 + ,39 + ,44339 + ,3704 + ,24 + ,23 + ,449 + ,31414 + ,19 + ,0 + ,18 + ,8 + ,25 + ,14116 + ,3988 + ,39 + ,39 + ,800 + ,46698 + ,45 + ,0 + ,14 + ,13 + ,52 + ,10288 + ,3030 + ,14 + ,14 + ,1684 + ,131698 + ,65 + ,0 + ,60 + ,19 + ,75 + ,65622 + ,13520 + ,78 + ,78 + ,1050 + ,91735 + ,35 + ,0 + ,7 + ,18 + ,71 + ,16563 + ,1421 + ,15 + ,14 + ,2699 + ,244749 + ,95 + ,2 + ,98 + ,33 + ,124 + ,76643 + ,20923 + ,106 + ,101 + ,1606 + ,184510 + ,49 + ,7 + ,64 + ,40 + ,151 + ,110681 + ,20237 + ,83 + ,82 + ,1502 + ,79863 + ,37 + ,1 + ,29 + ,22 + ,71 + ,29011 + ,3219 + ,24 + ,24 + ,1204 + ,128423 + ,64 + ,8 + ,32 + ,38 + ,145 + ,92696 + ,3769 + ,37 + ,36 + ,1138 + ,97839 + ,38 + ,2 + ,25 + ,24 + ,87 + ,94785 + ,12252 + ,77 + ,75 + ,568 + ,38214 + ,34 + ,0 + ,16 + ,8 + ,27 + ,8773 + ,1888 + ,16 + ,16 + ,1459 + ,151101 + ,32 + ,2 + ,48 + ,35 + ,131 + ,83209 + ,14497 + ,56 + ,55 + ,2158 + ,272458 + ,65 + ,0 + ,100 + ,43 + ,162 + ,93815 + ,28864 + ,132 + ,131 + ,1111 + ,172494 + ,52 + ,0 + ,46 + ,43 + ,165 + ,86687 + ,21721 + ,144 + ,131 + ,1421 + ,108043 + ,62 + ,1 + ,45 + ,14 + ,54 + ,34553 + ,4821 + ,40 + ,39 + ,2833 + ,328107 + ,65 + ,3 + ,129 + ,41 + ,159 + ,105547 + ,33644 + ,153 + ,144 + ,1955 + ,250579 + ,83 + ,0 + ,130 + ,38 + ,147 + ,103487 + ,15923 + ,143 + ,139 + ,2922 + ,351067 + ,95 + ,3 + ,136 + ,45 + ,170 + ,213688 + ,42935 + ,220 + ,211 + ,1002 + ,158015 + ,29 + ,0 + ,59 + ,31 + ,119 + ,71220 + ,18864 + ,79 + ,78 + ,1060 + ,98866 + ,18 + ,0 + ,25 + ,13 + ,49 + ,23517 + ,4977 + ,50 + ,50 + ,956 + ,85439 + ,33 + ,0 + ,32 + ,28 + ,104 + ,56926 + ,7785 + ,39 + ,39 + ,2186 + ,229242 + ,247 + ,4 + ,63 + ,31 + ,120 + ,91721 + ,17939 + ,95 + ,90 + ,3604 + ,351619 + ,139 + ,4 + ,95 + ,40 + ,150 + ,115168 + ,23436 + ,169 + ,166 + ,1035 + ,84207 + ,29 + ,11 + ,14 + ,30 + ,112 + ,111194 + ,325 + ,12 + ,12 + ,1417 + ,120445 + ,118 + ,0 + ,36 + ,16 + ,59 + ,51009 + ,13539 + ,63 + ,57 + ,3261 + ,324598 + ,110 + ,0 + ,113 + ,37 + ,136 + ,135777 + ,34538 + ,134 + ,133 + ,1587 + ,131069 + ,67 + ,4 + ,47 + ,30 + ,107 + ,51513 + ,12198 + ,69 + ,69 + ,1424 + ,204271 + ,42 + ,0 + ,92 + ,35 + ,130 + ,74163 + ,26924 + ,119 + ,119 + ,1701 + ,165543 + ,65 + ,1 + ,70 + ,32 + ,115 + ,51633 + ,12716 + ,119 + ,119 + ,1249 + ,141722 + ,94 + ,0 + ,19 + ,27 + ,107 + ,75345 + ,8172 + ,75 + ,65 + ,946 + ,116048 + ,64 + ,0 + ,50 + ,20 + ,75 + ,33416 + ,10855 + ,63 + ,61 + ,1926 + ,250047 + ,81 + ,0 + ,41 + ,18 + ,71 + ,83305 + ,11932 + ,55 + ,49 + ,3352 + ,299775 + ,95 + ,9 + ,91 + ,31 + ,120 + ,98952 + ,14300 + ,103 + ,101 + ,1641 + ,195838 + ,67 + ,1 + ,111 + ,31 + ,116 + ,102372 + ,25515 + ,197 + ,196 + ,2035 + ,173260 + ,63 + ,3 + ,41 + ,21 + ,79 + ,37238 + ,2805 + ,16 + ,15 + ,2312 + ,254488 + ,83 + ,10 + ,120 + ,39 + ,150 + ,103772 + ,29402 + ,140 + ,136 + ,1369 + ,104389 + ,45 + ,5 + ,135 + ,41 + ,156 + ,123969 + ,16440 + ,89 + ,89 + ,1577 + ,136084 + ,30 + ,0 + ,27 + ,13 + ,51 + ,27142 + ,11221 + ,40 + ,40 + ,2201 + ,199476 + ,70 + ,2 + ,87 + ,32 + ,118 + ,135400 + ,28732 + ,125 + ,123 + ,961 + ,92499 + ,32 + ,0 + ,25 + ,18 + ,71 + ,21399 + ,5250 + ,21 + ,21 + ,1900 + ,224330 + ,83 + ,1 + ,131 + ,39 + ,144 + ,130115 + ,28608 + ,167 + ,163 + ,1254 + ,135781 + ,31 + ,2 + ,45 + ,14 + ,47 + ,24874 + ,8092 + ,32 + ,29 + ,1335 + ,74408 + ,67 + ,4 + ,29 + ,7 + ,28 + ,34988 + ,4473 + ,36 + ,35 + ,1597 + ,81240 + ,66 + ,0 + ,58 + ,17 + ,68 + ,45549 + ,1572 + ,13 + ,13 + ,207 + ,14688 + ,10 + ,0 + ,4 + ,0 + ,0 + ,6023 + ,2065 + ,5 + ,5 + ,1645 + ,181633 + ,70 + ,2 + ,47 + ,30 + ,110 + ,64466 + ,14817 + ,96 + ,96 + ,2429 + ,271856 + ,103 + ,1 + ,109 + ,37 + ,147 + ,54990 + ,16714 + ,151 + ,151 + ,151 + ,7199 + ,5 + ,0 + ,7 + ,0 + ,0 + ,1644 + ,556 + ,6 + ,6 + ,474 + ,46660 + ,20 + ,0 + ,12 + ,5 + ,15 + ,6179 + ,2089 + ,13 + ,13 + ,141 + ,17547 + ,5 + ,0 + ,0 + ,1 + ,4 + ,3926 + ,2658 + ,3 + ,3 + ,1639 + ,133368 + ,36 + ,1 + ,37 + ,16 + ,64 + ,32755 + ,10695 + ,57 + ,56 + ,872 + ,95227 + ,34 + ,0 + ,37 + ,32 + ,111 + ,34777 + ,1669 + ,23 + ,23 + ,1318 + ,152601 + ,48 + ,2 + ,46 + ,24 + ,85 + ,73224 + ,16267 + ,61 + ,57 + ,1018 + ,98146 + ,40 + ,0 + ,15 + ,17 + ,68 + ,27114 + ,7768 + ,21 + ,14 + ,1383 + ,79619 + ,43 + ,3 + ,42 + ,11 + ,40 + ,20760 + ,7252 + ,43 + ,43 + ,1314 + ,59194 + ,31 + ,6 + ,7 + ,24 + ,80 + ,37636 + ,6387 + ,20 + ,20 + ,1335 + ,139942 + ,42 + ,0 + ,54 + ,22 + ,88 + ,65461 + ,18715 + ,82 + ,72 + ,1403 + ,118612 + ,46 + ,2 + ,54 + ,12 + ,48 + ,30080 + ,7936 + ,90 + ,87 + ,910 + ,72880 + ,33 + ,0 + ,14 + ,19 + ,76 + ,24094 + ,8643 + ,25 + ,21 + ,616 + ,65475 + ,18 + ,2 + ,16 + ,13 + ,51 + ,69008 + ,7294 + ,60 + ,56 + ,1407 + ,99643 + ,55 + ,1 + ,33 + ,17 + ,67 + ,54968 + ,4570 + ,61 + ,59 + ,771 + ,71965 + ,35 + ,1 + ,32 + ,15 + ,59 + ,46090 + ,7185 + ,85 + ,82 + ,766 + ,77272 + ,59 + ,2 + ,21 + ,16 + ,61 + ,27507 + ,10058 + ,43 + ,43 + ,473 + ,49289 + ,19 + ,1 + ,15 + ,24 + ,76 + ,10672 + ,2342 + ,25 + ,25 + ,1376 + ,135131 + ,66 + ,0 + ,38 + ,15 + ,60 + ,34029 + ,8509 + ,41 + ,38 + ,1232 + ,108446 + ,60 + ,1 + ,22 + ,17 + ,68 + ,46300 + ,13275 + ,26 + ,25 + ,1521 + ,89746 + ,36 + ,3 + ,28 + ,18 + ,71 + ,24760 + ,6816 + ,38 + ,38 + ,572 + ,44296 + ,25 + ,0 + ,10 + ,20 + ,76 + ,18779 + ,1930 + ,12 + ,12 + ,1059 + ,77648 + ,47 + ,0 + ,31 + ,16 + ,62 + ,21280 + ,8086 + ,29 + ,29 + ,1544 + ,181528 + ,54 + ,0 + ,32 + ,16 + ,61 + ,40662 + ,10737 + ,49 + ,47 + ,1230 + ,134019 + ,53 + ,0 + ,32 + ,18 + ,67 + ,28987 + ,8033 + ,46 + ,45 + ,1206 + ,124064 + ,40 + ,1 + ,43 + ,22 + ,88 + ,22827 + ,7058 + ,41 + ,40 + ,1205 + ,92630 + ,40 + ,4 + ,27 + ,8 + ,30 + ,18513 + ,6782 + ,31 + ,30 + ,1255 + ,121848 + ,39 + ,0 + ,37 + ,17 + ,64 + ,30594 + ,5401 + ,41 + ,41 + ,613 + ,52915 + ,14 + ,0 + ,20 + ,18 + ,68 + ,24006 + ,6521 + ,26 + ,25 + ,721 + ,81872 + ,45 + ,0 + ,32 + ,16 + ,64 + ,27913 + ,10856 + ,23 + ,23 + ,1109 + ,58981 + ,36 + ,7 + ,0 + ,23 + ,91 + ,42744 + ,2154 + ,14 + ,14 + ,740 + ,53515 + ,28 + ,2 + ,5 + ,22 + ,88 + ,12934 + ,6117 + ,16 + ,16 + ,1126 + ,60812 + ,44 + ,0 + ,26 + ,13 + ,52 + ,22574 + ,5238 + ,25 + ,26 + ,728 + ,56375 + ,30 + ,7 + ,10 + ,13 + ,49 + ,41385 + ,4820 + ,21 + ,21 + ,689 + ,65490 + ,22 + ,3 + ,27 + ,16 + ,62 + ,18653 + ,5615 + ,32 + ,27 + ,592 + ,80949 + ,17 + ,0 + ,11 + ,16 + ,61 + ,18472 + ,4272 + ,9 + ,9 + ,995 + ,76302 + ,31 + ,0 + ,29 + ,20 + ,76 + ,30976 + ,8702 + ,35 + ,33 + ,1613 + ,104011 + ,55 + ,6 + ,25 + ,22 + ,88 + ,63339 + ,15340 + ,42 + ,42 + ,2048 + ,98104 + ,54 + ,2 + ,55 + ,17 + ,66 + ,25568 + ,8030 + ,68 + ,68 + ,705 + ,67989 + ,21 + ,0 + ,23 + ,18 + ,71 + ,33747 + ,9526 + ,32 + ,32 + ,301 + ,30989 + ,14 + ,0 + ,5 + ,17 + ,68 + ,4154 + ,1278 + ,6 + ,6 + ,1803 + ,135458 + ,81 + ,3 + ,43 + ,12 + ,48 + ,19474 + ,4236 + ,68 + ,67 + ,799 + ,73504 + ,35 + ,0 + ,23 + ,7 + ,25 + ,35130 + ,3023 + ,33 + ,33 + ,861 + ,63123 + ,43 + ,1 + ,34 + ,17 + ,68 + ,39067 + ,7196 + ,84 + ,77 + ,1186 + ,61254 + ,46 + ,1 + ,36 + ,14 + ,41 + ,13310 + ,3394 + ,46 + ,46 + ,1451 + ,74914 + ,30 + ,0 + ,35 + ,23 + ,90 + ,65892 + ,6371 + ,30 + ,30 + ,628 + ,31774 + ,23 + ,1 + ,0 + ,17 + ,66 + ,4143 + ,1574 + ,0 + ,0 + ,1161 + ,81437 + ,38 + ,0 + ,37 + ,14 + ,54 + ,28579 + ,9620 + ,36 + ,36 + ,1463 + ,87186 + ,54 + ,0 + ,28 + ,15 + ,59 + ,51776 + ,6978 + ,47 + ,46 + ,742 + ,50090 + ,20 + ,0 + ,16 + ,17 + ,60 + ,21152 + ,4911 + ,20 + ,18 + ,979 + ,65745 + ,53 + ,0 + ,26 + ,21 + ,77 + ,38084 + ,8645 + ,50 + ,48 + ,675 + ,56653 + ,45 + ,0 + ,38 + ,18 + ,68 + ,27717 + ,8987 + ,30 + ,29 + ,1241 + ,158399 + ,39 + ,0 + ,23 + ,18 + ,72 + ,32928 + ,5544 + ,30 + ,28 + ,676 + ,46455 + ,20 + ,0 + ,22 + ,17 + ,67 + ,11342 + ,3083 + ,34 + ,34 + ,1049 + ,73624 + ,24 + ,0 + ,30 + ,17 + ,64 + ,19499 + ,6909 + ,33 + ,33 + ,620 + ,38395 + ,31 + ,0 + ,16 + ,16 + ,63 + ,16380 + ,3189 + ,34 + ,34 + ,1081 + ,91899 + ,35 + ,0 + ,18 + ,15 + ,59 + ,36874 + ,6745 + ,37 + ,33 + ,1688 + ,139526 + ,151 + ,0 + ,28 + ,21 + ,84 + ,48259 + ,16724 + ,83 + ,80 + ,736 + ,52164 + ,52 + ,0 + ,32 + ,16 + ,64 + ,16734 + ,4850 + ,32 + ,32 + ,617 + ,51567 + ,30 + ,2 + ,21 + ,14 + ,56 + ,28207 + ,7025 + ,30 + ,30 + ,812 + ,70551 + ,31 + ,0 + ,23 + ,15 + ,54 + ,30143 + ,6047 + ,43 + ,41 + ,1051 + ,84856 + ,29 + ,1 + ,29 + ,17 + ,67 + ,41369 + ,7377 + ,41 + ,41 + ,1656 + ,102538 + ,57 + ,1 + ,50 + ,15 + ,58 + ,45833 + ,9078 + ,51 + ,51 + ,705 + ,86678 + ,40 + ,0 + ,12 + ,15 + ,59 + ,29156 + ,4605 + ,19 + ,18 + ,945 + ,85709 + ,44 + ,0 + ,21 + ,10 + ,40 + ,35944 + ,3238 + ,37 + ,34 + ,554 + ,34662 + ,25 + ,0 + ,18 + ,6 + ,22 + ,36278 + ,8100 + ,33 + ,31 + ,1597 + ,150580 + ,77 + ,0 + ,27 + ,22 + ,83 + ,45588 + ,9653 + ,41 + ,39 + ,982 + ,99611 + ,35 + ,0 + ,41 + ,21 + ,81 + ,45097 + ,8914 + ,54 + ,54 + ,222 + ,19349 + ,11 + ,0 + ,13 + ,1 + ,2 + ,3895 + ,786 + ,14 + ,14 + ,1212 + ,99373 + ,63 + ,1 + ,12 + ,18 + ,72 + ,28394 + ,6700 + ,25 + ,24 + ,1143 + ,86230 + ,44 + ,0 + ,21 + ,17 + ,61 + ,18632 + ,5788 + ,25 + ,24 + ,435 + ,30837 + ,19 + ,0 + ,8 + ,4 + ,15 + ,2325 + ,593 + ,8 + ,8 + ,532 + ,31706 + ,13 + ,0 + ,26 + ,10 + ,32 + ,25139 + ,4506 + ,26 + ,26 + ,882 + ,89806 + ,42 + ,0 + ,27 + ,16 + ,62 + ,27975 + ,6382 + ,20 + ,19 + ,608 + ,62088 + ,38 + ,1 + ,13 + ,16 + ,58 + ,14483 + ,5621 + ,11 + ,11 + ,459 + ,40151 + ,29 + ,0 + ,16 + ,9 + ,36 + ,13127 + ,3997 + ,14 + ,14 + ,578 + ,27634 + ,20 + ,0 + ,2 + ,16 + ,59 + ,5839 + ,520 + ,3 + ,1 + ,826 + ,76990 + ,27 + ,0 + ,42 + ,17 + ,68 + ,24069 + ,8891 + ,40 + ,39 + ,509 + ,37460 + ,20 + ,0 + ,5 + ,7 + ,21 + ,3738 + ,999 + ,5 + ,5 + ,717 + ,54157 + ,19 + ,0 + ,37 + ,15 + ,55 + ,18625 + ,7067 + ,38 + ,37 + ,637 + ,49862 + ,37 + ,0 + ,17 + ,14 + ,54 + ,36341 + ,4639 + ,32 + ,32 + ,857 + ,84337 + ,26 + ,0 + ,38 + ,14 + ,55 + ,24548 + ,5654 + ,41 + ,38 + ,830 + ,64175 + ,42 + ,0 + ,37 + ,18 + ,72 + ,21792 + ,6928 + ,46 + ,47 + ,652 + ,59382 + ,49 + ,0 + ,29 + ,12 + ,41 + ,26263 + ,1514 + ,47 + ,47 + ,707 + ,119308 + ,30 + ,0 + ,32 + ,16 + ,61 + ,23686 + ,9238 + ,37 + ,37 + ,954 + ,76702 + ,49 + ,0 + ,35 + ,21 + ,67 + ,49303 + ,8204 + ,51 + ,51 + ,1461 + ,103425 + ,67 + ,1 + ,17 + ,19 + ,76 + ,25659 + ,5926 + ,49 + ,45 + ,672 + ,70344 + ,28 + ,0 + ,20 + ,16 + ,64 + ,28904 + ,5785 + ,21 + ,21 + ,778 + ,43410 + ,19 + ,0 + ,7 + ,1 + ,3 + ,2781 + ,4 + ,1 + ,1 + ,1141 + ,104838 + ,49 + ,1 + ,46 + ,16 + ,63 + ,29236 + ,5930 + ,44 + ,42 + ,680 + ,62215 + ,27 + ,0 + ,24 + ,10 + ,40 + ,19546 + ,3710 + ,26 + ,26 + ,1090 + ,69304 + ,30 + ,6 + ,40 + ,19 + ,69 + ,22818 + ,705 + ,21 + ,21 + ,616 + ,53117 + ,22 + ,3 + ,3 + ,12 + ,48 + ,32689 + ,443 + ,4 + ,4 + ,285 + ,19764 + ,12 + ,1 + ,10 + ,2 + ,8 + ,5752 + ,2416 + ,10 + ,10 + ,1145 + ,86680 + ,31 + ,2 + ,37 + ,14 + ,52 + ,22197 + ,7747 + ,43 + ,43 + ,733 + ,84105 + ,20 + ,0 + ,17 + ,17 + ,66 + ,20055 + ,5432 + ,34 + ,34 + ,888 + ,77945 + ,20 + ,0 + ,28 + ,19 + ,76 + ,25272 + ,4913 + ,32 + ,31 + ,849 + ,89113 + ,39 + ,0 + ,19 + ,14 + ,43 + ,82206 + ,2650 + ,20 + ,19 + ,1182 + ,91005 + ,29 + ,3 + ,29 + ,11 + ,39 + ,32073 + ,2370 + ,34 + ,34 + ,528 + ,40248 + ,16 + ,1 + ,8 + ,4 + ,14 + ,5444 + ,775 + ,6 + ,6 + ,642 + ,64187 + ,27 + ,0 + ,10 + ,16 + ,61 + ,20154 + ,5576 + ,12 + ,11 + ,947 + ,50857 + ,21 + ,0 + ,15 + ,20 + ,71 + ,36944 + ,1352 + ,24 + ,24 + ,819 + ,56613 + ,19 + ,1 + ,15 + ,12 + ,44 + ,8019 + ,3080 + ,16 + ,16 + ,757 + ,62792 + ,35 + ,0 + ,28 + ,15 + ,60 + ,30884 + ,10205 + ,72 + ,72 + ,894 + ,72535 + ,14 + ,0 + ,17 + ,16 + ,64 + ,19540 + ,6095 + ,27 + ,21) + ,dim=c(11 + ,289) + ,dimnames=list(c('pageviews' + ,'time_in_rfc' + ,'logins' + ,'shared_compendiums' + ,'blogged_computations' + ,'compendiums_reviewed' + ,'feedback_messages_p1' + ,'totsize' + ,'totrevisions' + ,'tothyperlinks' + ,'totblogs') + ,1:289)) > y <- array(NA,dim=c(11,289),dimnames=list(c('pageviews','time_in_rfc','logins','shared_compendiums','blogged_computations','compendiums_reviewed','feedback_messages_p1','totsize','totrevisions','tothyperlinks','totblogs'),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 = '2' > par2 = 'quantiles' > par1 = '1' > 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 Attaching package: 'zoo' The following object(s) are masked from 'package:base': as.Date, as.Date.numeric Loading required package: sandwich Loading required package: strucchange Loading required package: vcd Loading required package: MASS Loading required package: colorspace > library(Hmisc) Hmisc library by Frank E Harrell Jr Type library(help='Hmisc'), ?Overview, or ?Hmisc.Overview') to see overall documentation. NOTE:Hmisc no longer redefines [.factor to drop unused levels when subsetting. To get the old behavior of Hmisc type dropUnusedLevels(). 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] "pageviews" > x[,par1] [1] 1418 869 1530 2172 901 463 3201 371 1192 1583 1439 1764 1495 1373 2187 [16] 1491 4041 1706 2152 1036 1882 1929 2242 1220 1289 2515 2147 2352 1638 1222 [31] 1812 1677 1579 1731 807 2452 829 1940 2662 186 1499 865 1793 2527 2747 [46] 1324 2702 1383 1179 2099 4308 918 1831 3373 1713 1438 496 2253 744 1161 [61] 2352 2144 4691 1112 2694 1973 1769 3148 2474 2084 1954 1226 1389 1496 2269 [76] 1833 1268 1943 893 1762 1403 1425 1857 1840 1502 1441 1420 1416 2970 1317 [91] 1644 870 1654 1054 937 3004 2008 2547 1885 1626 1468 2445 1964 1381 1369 [106] 1659 2888 1290 2845 1982 1904 1391 602 1743 1559 2014 2143 2146 874 1590 [121] 1590 1210 2072 1281 1401 834 1105 1272 1944 391 761 1605 530 1988 1386 [136] 2395 387 1742 620 449 800 1684 1050 2699 1606 1502 1204 1138 568 1459 [151] 2158 1111 1421 2833 1955 2922 1002 1060 956 2186 3604 1035 1417 3261 1587 [166] 1424 1701 1249 946 1926 3352 1641 2035 2312 1369 1577 2201 961 1900 1254 [181] 1335 1597 207 1645 2429 151 474 141 1639 872 1318 1018 1383 1314 1335 [196] 1403 910 616 1407 771 766 473 1376 1232 1521 572 1059 1544 1230 1206 [211] 1205 1255 613 721 1109 740 1126 728 689 592 995 1613 2048 705 301 [226] 1803 799 861 1186 1451 628 1161 1463 742 979 675 1241 676 1049 620 [241] 1081 1688 736 617 812 1051 1656 705 945 554 1597 982 222 1212 1143 [256] 435 532 882 608 459 578 826 509 717 637 857 830 652 707 954 [271] 1461 672 778 1141 680 1090 616 285 1145 733 888 849 1182 528 642 [286] 947 819 757 894 > 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]) [ 141,1369) [1369,4691] 145 144 > colnames(x) [1] "pageviews" "time_in_rfc" "logins" [4] "shared_compendiums" "blogged_computations" "compendiums_reviewed" [7] "feedback_messages_p1" "totsize" "totrevisions" [10] "tothyperlinks" "totblogs" > colnames(x)[par1] [1] "pageviews" > x[,par1] [1] [1369,4691] [ 141,1369) [1369,4691] [1369,4691] [ 141,1369) [ 141,1369) [7] [1369,4691] [ 141,1369) [ 141,1369) [1369,4691] [1369,4691] [1369,4691] [13] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [19] [1369,4691] [ 141,1369) [1369,4691] [1369,4691] [1369,4691] [ 141,1369) [25] [ 141,1369) [1369,4691] [1369,4691] [1369,4691] [1369,4691] [ 141,1369) [31] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [ 141,1369) [1369,4691] [37] [ 141,1369) [1369,4691] [1369,4691] [ 141,1369) [1369,4691] [ 141,1369) [43] [1369,4691] [1369,4691] [1369,4691] [ 141,1369) [1369,4691] [1369,4691] [49] [ 141,1369) [1369,4691] [1369,4691] [ 141,1369) [1369,4691] [1369,4691] [55] [1369,4691] [1369,4691] [ 141,1369) [1369,4691] [ 141,1369) [ 141,1369) [61] [1369,4691] [1369,4691] [1369,4691] [ 141,1369) [1369,4691] [1369,4691] [67] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [ 141,1369) [73] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [ 141,1369) [1369,4691] [79] [ 141,1369) [1369,4691] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [85] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [ 141,1369) [91] [1369,4691] [ 141,1369) [1369,4691] [ 141,1369) [ 141,1369) [1369,4691] [97] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [103] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [ 141,1369) [109] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [ 141,1369) [1369,4691] [115] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [ 141,1369) [1369,4691] [121] [1369,4691] [ 141,1369) [1369,4691] [ 141,1369) [1369,4691] [ 141,1369) [127] [ 141,1369) [ 141,1369) [1369,4691] [ 141,1369) [ 141,1369) [1369,4691] [133] [ 141,1369) [1369,4691] [1369,4691] [1369,4691] [ 141,1369) [1369,4691] [139] [ 141,1369) [ 141,1369) [ 141,1369) [1369,4691] [ 141,1369) [1369,4691] [145] [1369,4691] [1369,4691] [ 141,1369) [ 141,1369) [ 141,1369) [1369,4691] [151] [1369,4691] [ 141,1369) [1369,4691] [1369,4691] [1369,4691] [1369,4691] [157] [ 141,1369) [ 141,1369) [ 141,1369) [1369,4691] [1369,4691] [ 141,1369) [163] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [ 141,1369) [169] [ 141,1369) [1369,4691] [1369,4691] [1369,4691] [1369,4691] [1369,4691] [175] [1369,4691] [1369,4691] [1369,4691] [ 141,1369) [1369,4691] [ 141,1369) [181] [ 141,1369) [1369,4691] [ 141,1369) [1369,4691] [1369,4691] [ 141,1369) [187] [ 141,1369) [ 141,1369) [1369,4691] [ 141,1369) [ 141,1369) [ 141,1369) [193] [1369,4691] [ 141,1369) [ 141,1369) [1369,4691] [ 141,1369) [ 141,1369) [199] [1369,4691] [ 141,1369) [ 141,1369) [ 141,1369) [1369,4691] [ 141,1369) [205] [1369,4691] [ 141,1369) [ 141,1369) [1369,4691] [ 141,1369) [ 141,1369) [211] [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [217] [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [1369,4691] [223] [1369,4691] [ 141,1369) [ 141,1369) [1369,4691] [ 141,1369) [ 141,1369) [229] [ 141,1369) [1369,4691] [ 141,1369) [ 141,1369) [1369,4691] [ 141,1369) [235] [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [241] [ 141,1369) [1369,4691] [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [247] [1369,4691] [ 141,1369) [ 141,1369) [ 141,1369) [1369,4691] [ 141,1369) [253] [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [259] [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [265] [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [271] [1369,4691] [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [277] [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [283] [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [ 141,1369) [289] [ 141,1369) Levels: [ 141,1369) [1369,4691] > 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/1y53t1354801563.tab") + } + } > m Conditional inference tree with 5 terminal nodes Response: as.factor(pageviews) Inputs: time_in_rfc, logins, shared_compendiums, blogged_computations, compendiums_reviewed, feedback_messages_p1, totsize, totrevisions, tothyperlinks, totblogs Number of observations: 289 1) time_in_rfc <= 130585; criterion = 1, statistic = 154.086 2) logins <= 53; criterion = 1, statistic = 35.07 3) blogged_computations <= 47; criterion = 0.999, statistic = 14.999 4)* weights = 120 3) blogged_computations > 47 5)* weights = 8 2) logins > 53 6)* weights = 25 1) time_in_rfc > 130585 7) blogged_computations <= 56; criterion = 1, statistic = 18.21 8)* weights = 33 7) blogged_computations > 56 9)* weights = 103 > postscript(file="/var/wessaorg/rcomp/tmp/2umcg1354801563.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/30wk01354801563.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(x[,par1] ~ as.factor(where(m)),main='Response by Terminal Node',xlab='Terminal Node',ylab='Response') > dev.off() null device 1 > if (par2 == 'none') { + forec <- predict(m) + result <- as.data.frame(cbind(x[,par1],forec,x[,par1]-forec)) + colnames(result) <- c('Actuals','Forecasts','Residuals') + print(result) + } > if (par2 != 'none') { + print(cbind(as.factor(x[,par1]),predict(m))) + myt <- table(as.factor(x[,par1]),predict(m)) + print(myt) + } [,1] [,2] [1,] 2 2 [2,] 1 2 [3,] 2 2 [4,] 2 2 [5,] 1 1 [6,] 1 1 [7,] 2 2 [8,] 1 1 [9,] 1 2 [10,] 2 2 [11,] 2 2 [12,] 2 2 [13,] 2 2 [14,] 2 2 [15,] 2 2 [16,] 2 2 [17,] 2 2 [18,] 2 2 [19,] 2 2 [20,] 1 2 [21,] 2 2 [22,] 2 2 [23,] 2 2 [24,] 1 2 [25,] 1 2 [26,] 2 2 [27,] 2 2 [28,] 2 2 [29,] 2 2 [30,] 1 1 [31,] 2 2 [32,] 2 2 [33,] 2 2 [34,] 2 2 [35,] 1 1 [36,] 2 2 [37,] 1 1 [38,] 2 2 [39,] 2 2 [40,] 1 1 [41,] 2 2 [42,] 1 1 [43,] 2 2 [44,] 2 2 [45,] 2 2 [46,] 1 2 [47,] 2 2 [48,] 2 2 [49,] 1 1 [50,] 2 2 [51,] 2 2 [52,] 1 1 [53,] 2 2 [54,] 2 2 [55,] 2 2 [56,] 2 2 [57,] 1 1 [58,] 2 2 [59,] 1 1 [60,] 1 2 [61,] 2 2 [62,] 2 2 [63,] 2 2 [64,] 1 1 [65,] 2 2 [66,] 2 2 [67,] 2 2 [68,] 2 2 [69,] 2 2 [70,] 2 2 [71,] 2 2 [72,] 1 2 [73,] 2 2 [74,] 2 2 [75,] 2 2 [76,] 2 2 [77,] 1 1 [78,] 2 2 [79,] 1 1 [80,] 2 2 [81,] 2 2 [82,] 2 2 [83,] 2 2 [84,] 2 2 [85,] 2 2 [86,] 2 2 [87,] 2 2 [88,] 2 1 [89,] 2 2 [90,] 1 2 [91,] 2 2 [92,] 1 1 [93,] 2 1 [94,] 1 1 [95,] 1 1 [96,] 2 2 [97,] 2 2 [98,] 2 2 [99,] 2 2 [100,] 2 2 [101,] 2 2 [102,] 2 2 [103,] 2 2 [104,] 2 2 [105,] 2 2 [106,] 2 2 [107,] 2 2 [108,] 1 1 [109,] 2 2 [110,] 2 2 [111,] 2 2 [112,] 2 2 [113,] 1 1 [114,] 2 2 [115,] 2 2 [116,] 2 2 [117,] 2 2 [118,] 2 2 [119,] 1 1 [120,] 2 2 [121,] 2 2 [122,] 1 2 [123,] 2 2 [124,] 1 2 [125,] 2 2 [126,] 1 1 [127,] 1 1 [128,] 1 1 [129,] 2 2 [130,] 1 1 [131,] 1 1 [132,] 2 2 [133,] 1 1 [134,] 2 2 [135,] 2 2 [136,] 2 2 [137,] 1 1 [138,] 2 2 [139,] 1 1 [140,] 1 1 [141,] 1 1 [142,] 2 2 [143,] 1 1 [144,] 2 2 [145,] 2 2 [146,] 2 1 [147,] 1 2 [148,] 1 1 [149,] 1 1 [150,] 2 2 [151,] 2 2 [152,] 1 2 [153,] 2 2 [154,] 2 2 [155,] 2 2 [156,] 2 2 [157,] 1 2 [158,] 1 1 [159,] 1 1 [160,] 2 2 [161,] 2 2 [162,] 1 1 [163,] 2 2 [164,] 2 2 [165,] 2 2 [166,] 2 2 [167,] 2 2 [168,] 1 2 [169,] 1 2 [170,] 2 2 [171,] 2 2 [172,] 2 2 [173,] 2 2 [174,] 2 2 [175,] 2 1 [176,] 2 2 [177,] 2 2 [178,] 1 1 [179,] 2 2 [180,] 1 2 [181,] 1 2 [182,] 2 2 [183,] 1 1 [184,] 2 2 [185,] 2 2 [186,] 1 1 [187,] 1 1 [188,] 1 1 [189,] 2 2 [190,] 1 1 [191,] 1 2 [192,] 1 1 [193,] 2 1 [194,] 1 1 [195,] 1 2 [196,] 2 1 [197,] 1 1 [198,] 1 1 [199,] 2 2 [200,] 1 1 [201,] 1 2 [202,] 1 1 [203,] 2 2 [204,] 1 2 [205,] 2 1 [206,] 1 1 [207,] 1 1 [208,] 2 2 [209,] 1 2 [210,] 1 1 [211,] 1 1 [212,] 1 1 [213,] 1 1 [214,] 1 1 [215,] 1 1 [216,] 1 1 [217,] 1 1 [218,] 1 1 [219,] 1 1 [220,] 1 1 [221,] 1 1 [222,] 2 2 [223,] 2 2 [224,] 1 1 [225,] 1 1 [226,] 2 2 [227,] 1 1 [228,] 1 1 [229,] 1 1 [230,] 2 1 [231,] 1 1 [232,] 1 1 [233,] 2 2 [234,] 1 1 [235,] 1 1 [236,] 1 1 [237,] 1 2 [238,] 1 1 [239,] 1 1 [240,] 1 1 [241,] 1 1 [242,] 2 2 [243,] 1 1 [244,] 1 1 [245,] 1 1 [246,] 1 1 [247,] 2 2 [248,] 1 1 [249,] 1 1 [250,] 1 1 [251,] 2 2 [252,] 1 1 [253,] 1 1 [254,] 1 2 [255,] 1 1 [256,] 1 1 [257,] 1 1 [258,] 1 1 [259,] 1 1 [260,] 1 1 [261,] 1 1 [262,] 1 1 [263,] 1 1 [264,] 1 1 [265,] 1 1 [266,] 1 1 [267,] 1 1 [268,] 1 1 [269,] 1 1 [270,] 1 1 [271,] 2 2 [272,] 1 1 [273,] 1 1 [274,] 1 1 [275,] 1 1 [276,] 1 1 [277,] 1 1 [278,] 1 1 [279,] 1 1 [280,] 1 1 [281,] 1 1 [282,] 1 1 [283,] 1 1 [284,] 1 1 [285,] 1 1 [286,] 1 1 [287,] 1 1 [288,] 1 1 [289,] 1 1 [ 141,1369) [1369,4691] [ 141,1369) 120 25 [1369,4691] 8 136 > postscript(file="/var/wessaorg/rcomp/tmp/4ffhp1354801563.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/5z1t71354801563.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/65uuy1354801563.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/726ej1354801563.tab") + } > > try(system("convert tmp/2umcg1354801563.ps tmp/2umcg1354801563.png",intern=TRUE)) character(0) > try(system("convert tmp/30wk01354801563.ps tmp/30wk01354801563.png",intern=TRUE)) character(0) > try(system("convert tmp/4ffhp1354801563.ps tmp/4ffhp1354801563.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 7.083 0.532 7.587