我有月度数据,我正在使用xts
outliersco <- function(daymat){
anom_max <- apply(daymat,1, mean)
df=data.frame(day= c(1:length(anom_max)), score=anom_max,month=format(index(daymat[1,]),"%Y-%m"))
return(df)
}
result<-do.call(rbind,apply.monthly(as.xts(data),outliersco))
个数据包处理数据。我想逐行汇总结果。使用的代码是
Warning message:
In (function (..., deparse.level = 1) :
number of columns of result is not a multiple of vector length (arg 2)
有了这个我就会收到警告
day score month
1 205.11 2015-08
.
1 618.38 2015-09
预期输出为:
data=structure(c(76.4696793874105, 71.6179878234863, 84.8529251098633,
958.558328882853, 1064.71247151693, 1143.91706988017, 1465.54269777934,
1094.67122599284, 465.385771560669, 85.7931273142497, 92.126918665568,
565.920468902588, 46.2456442515055, 70.5069728851318, 1240.55521977743,
203.691571044922, 52.735995610555, 121.48121770223, 81.083112970988,
1111.82586911519, 1281.87428207397, 1019.78892033895, 808.615553919474,
55.2633450826009, 706.848340733846, 148.27305021286, 379.253903198242,
59.7610775152842, 84.6999504089355, 78.8064709981283, 84.7680963993073,
1629.15148976644, 1517.4066628774, 76.2463499704997, 1551.93175633748,
375.284552510579, 1270.94230728149, 89.859725189209, 1083.87509053548,
1527.05773277283, 1162.88848470052, 1187.11032752991, 1197.92348607381,
1477.48905029297, 1595.89403699239, 85.9103705088298, 887.454245853424,
1592.98764165243, 1657.91018981934, 1192.38933982849, 1480.57377268473,
924.828320948283, 845.402794392904, 139.027433268229, 942.786067581177,
78.3142560323079, 100.396392313639, 80.9238953908284, 101.859100341797,
102.792204284668, 62.0261619567871, 62.2193504333496, 66.543171564738,
939.642989857992, 963.419678115845, 923.87637163798, 1363.70559781392,
1006.83787600199, 1095.97897135417, 65.8876703898112, 108.940827178955,
720.457081604004, 89.3719561258952, 1376.71593945821, 1051.85360997518,
677.155433909098, 82.0144990285238, 171.78073425293, 69.3071270942688,
994.957437515259, 1233.07528152466, 825.846636199951, 874.605358759562,
98.1577730337779, 69.9612260182699, 1451.70452540716, 117.747473414739,
115.300596872965, 60.0537647247314, 61.4740080515544, 685.358629099528,
1329.05631256104, 1278.26482454936, 548.42842985789, 1312.10697224935,
1845.54688695272, 1084.11381543477, 77.5058411916097, 60.6438775380452,
1301.69599571228, 1167.32949701945, 1039.39181340535, 1147.71215375264,
1280.93430468241, 1369.61168454488, 86.2218430836995, 228.073000590007,
1235.30471916199, 1513.44733365377, 1158.38261095683, 1339.78025792226,
730.35258585612, 952.151113128662, 76.6034478505453, 635.205955378215,
97.7872084299723, 62.9143486022949, 72.6992741902669, 73.2953123728434,
63.2663570404053, 58.7192942301432, 85.834098815918, 69.6167208353678,
967.46132405599, 952.763130696615, 857.342074839274, 1357.3248260498,
1047.62472610474, 1030.65070368449, 45.2986152648926, 97.6122169494629,
569.136493428548, 16.8941793070211, 1106.65521914164, 1076.34942639669,
550.949218241374, 62.7205412546794, 83.8203881581624, 111.242098236084,
972.079448064168, 1049.74619394938, 819.223524475098, 772.95450108846,
46.805627822876, 44.645251083374, 1673.86628112793, 115.167377503713,
90.7989596048991, 48.954354095459, 46.1111679077148, 2071.75801696777,
1187.44414176941, 1158.04252827962, 91.6032265981038, 1291.98449198405,
1537.25599619548, 1105.74604415894, 1008.60735117594, 92.0439093271891,
1217.60083262126, 1151.44061902364, 1016.52408459981, 1060.08866449992,
1132.80293896993, 784.194217681885, 801.744319661458, 83.7632680257161,
79.1661926269531, 610.153847122192, 1134.95647252401, 1350.55735104879,
686.450652313232, 629.092844136556, 107.9291943868, 562.577292346954,
90.1304608662923, 75.4119299570719, 246.663768513997, 122.016794331868,
83.325724919637, 99.1663974761963, 46.3373132069906, 881.87368812561,
814.344165039063, 818.391021474202, 751.686366144816, 386.657204055786,
974.533459981283, 1012.82586072286, 79.2890260060628, 69.1622281074524,
556.051997121175, 75.4857577006022, 1090.65891850789, 1032.327831014,
509.487206013997, 62.8273193359375, 74.6071548461914, 162.64507929484,
863.29914970398, 1020.41310908, 689.243608093262, 685.274570337931,
155.792863384883, 74.3738807678223, 1533.88245404561, 2010.11444371541,
957.534874852498, 87.168970489502, 88.1797079722087, 2101.90014139811,
984.47439142863, 1057.66969286601, 60.3286398569743, 1126.54669634501,
1330.20851923625, 883.401595815023, 1313.51731147766, 887.298438262939,
1110.60408045451, 840.17583732605, 772.959337615967, 1015.86326700846,
1137.05693562826, 68.9768110116323, 1735.28815333049, 687.726034037272,
104.970904032389, 73.4672215779622, 549.266794459025, 1248.79613164266,
673.798870976766, 598.50986735026, 70.6631516774495, 110.262641398112,
104.974432436625, 67.1714298248291, 89.4974466959635, 78.5646480560303,
63.6472966512044, 45.7739256540934, 79.9287902832031, 836.101469802856,
745.674845631917, 849.900057601929, 743.820224889119, 555.516612370809,
920.141861216227, 815.614299265544, 58.6426188151042, 73.5072962443034,
495.902812449137, 59.584411239624, 1001.36356493632, 1062.64867617289,
547.46374206543, 66.0540251413981, 98.5932147979736, 56.739905166626,
823.57888806661, 475.815072886149, 690.339583969116, 659.409451548259,
99.1103343963623, 38.6764104207357, 1250.04304863612, 1218.30511515935,
511.095566018422, 45.7585599263509, 56.994664255778, 1697.74328854879,
872.66515528361, 781.744943110148, 66.1019254048665, 1015.37046572367,
1239.3316947937, 790.572510019938, 1091.79328905741, 545.654795328776,
960.238487879435, 433.942059199015, 877.132200241089, 916.903034464518,
1036.92643852234, 68.275254313151, 1482.21553446452, 1462.42192548116,
127.301718393962, 112.571075439453, 127.99746615092, 1255.85775260925,
694.200640741984, 621.399829610189, 79.410554377238, 75.5982039133708,
43.9405968983968, 74.2802940368652, 87.454635365804, 76.7882569630941,
66.6332843144735, 69.4584400812785, 45.1113749186198, 511.979768244425,
674.907394282023, 545.937142562866, 321.494150670369, 481.693437512716,
936.495402018229, 617.785017490387, 82.403266175588, 94.425798034668,
534.971314875285, 130.832590230306, 974.943094507853, 798.955702972412,
435.700007883708, 734.498117256165, 66.6358539581299, 877.103968683879,
552.747485860189, 352.511885197957, 735.48942082723, 488.105805969238,
279.062794240316, 75.9794235229492, 99.5385150591532, 144.239612865448,
573.578664016724, 54.4278752644857, 121.630647786458, 856.8561226209,
1073.10395011902, 428.229168319702, 84.9662548065185, 695.388389968872,
702.267466100057, 675.596768188477, 680.119647979736, 93.6599758783976,
755.157620239258, 86.9366105397542, 814.886632664998, 957.558426793416,
1053.9745862325, 217.684460194906, 765.248806762695, 785.146075948079,
75.8003256479899, 114.844830576579, 58.6373916625977, 1083.60307184855,
487.528320058187, 544.330903752645, 57.2578147888184, 74.8538655598958,
62.8330956776937, 42.0342634836833, 52.7836647033691, 90.2303974151611,
85.8911632537842, 902.818855285645, 87.1676284790039, 1067.11724077861,
1534.23739547729, 684.069370905558, 434.648315429688, 1081.53244279226,
832.066516263144, 351.756674289703, 1198.91379267375, 736.954902362824,
759.980558443069, 454.060128672918, 975.054375330607, 269.010455036163,
412.606781260173, 571.514488697052, 939.839950021108, 394.048090648651,
1001.84274419149, 479.085600598653, 774.562008778254, 43.6162161947298,
765.440319951375, 380.688091659546, 1416.81830647786, 946.753935114543,
248.162703736623, 89.6753533681234, 91.0779089609782, 819.108817927043,
240.849304993947, 689.928640270233, 666.986117045085, 1060.05807965597,
116.344610309601, 263.314640426636, 795.598955090841, 924.572289594014,
942.582728385925, 457.46627667745, 722.19770600001, 110.357275549571,
235.814202880859, 518.94978872935, 826.203251934052, 671.369454956055,
271.590694967906, 775.763605117798, 608.05741669337, 535.238411076864,
607.42656027476, 363.623542785645, 862.73869527181, 452.80772040685,
88.5623919169108, 62.5325436909993, 52.4584181467692, 479.030300331116,
402.050217374166, 320.067679405212, 159.533481502533, 116.055941740672,
142.034597396851, 323.368010616303, 77.9050773620606, 681.94808883667,
727.637630508059, 56.0737173080444, 138.626844533284, 175.337270609538,
129.716231473287, 681.661864089966, 166.831411743164, 149.089401912689,
72.7952343622843, 59.3677874247233, 104.857496770223, 112.61175549825,
189.152958424886, 69.958797677358, 622.479447046916, 120.897979482015,
152.977733103434, 111.987838236491, 314.401607767741, 74.3067571640015,
63.0376382509867, 44.578931427002, 91.8596575419108, 86.9982785542806,
90.3034756978353, 124.073463408152, 393.995756117503, 91.7480158487956,
69.3575586636861, 461.297461096446, 106.21006304423, 117.990232976278,
88.6444263458252, 93.6618030548096, 158.775893847148, 530.386730321248,
482.160727055868, 156.226615873973, 478.289055760702, 113.034765307109,
181.699985949198, 121.996058654785, 253.1435546875, 90.0752750396728,
102.123189798991, 90.2985917409261, 63.0921211242676, 105.473895009359,
51.1088431040446, 60.0630797068278, 130.737655448914, 119.863011550903,
101.169774119059, 215.472060012817, 534.454599889119, 139.79113984108,
150.0881371816, 155.076044193904, 112.716629981995, 181.217476145426,
623.208744752975, 1002.12549298604, 133.018043835958, 172.109030707677,
116.710637029012, 119.340202522278, 1023.690559419, 518.096280860901,
99.521062596639, 847.317042922974, 86.1755129496257, 91.6341667175293,
164.567399978638, 97.261784807841, 403.600015131632, 56.9398784637451,
71.6714179992676, 168.936943880717, 86.623699092865, 100.964577611287,
1067.75780881246, 77.5651472727458, 59.0419784545898, 98.6520898183187,
58.0653974533081, 104.074156951904, 145.038043085734, 118.475090789795,
128.145071760813, 154.462012354533, 149.549394957225, 146.604545720418,
157.934879014472, 111.665755558014, 229.958447901408, 101.837913036346,
105.678485234578, 128.14429918925, 800.060980224609, 124.696008110046,
97.3828629811605, 107.858493041992, 127.316350364685, 460.961003748576,
111.647843106588, 121.825641187032, 371.11077559789, 121.683209673564,
62.6508515675863, 40.7113498687744, 158.237418174744, 205.309435955683,
101.62007671992, 146.335521443685, 106.07159318924, 104.017807642619,
65.6615011850993, 65.3614501953125, 99.4739966710409, 190.829801273346,
518.77985899789, 85.870209757487, 132.744890467326, 171.387553151449,
98.992036819458, 287.754337692261, 252.643993504842, 269.531089528402,
468.508902740479, 72.1957608540853, 89.5845076243083, 58.3022491455078,
79.7746490478516, 591.250716082255, 121.084928894043, 856.659139760335,
148.85420850118, 165.258858426412, 149.752684911092, 61.0540714263916,
170.048849344254, 85.8420992533366, 60.3618138631185, 52.4806049346924,
100.880459721883, 93.0659385681152, 102.426936721802, 219.572706604004,
63.0663935979207, 193.2112089475, 118.971433178584, 81.9056507110596,
73.3326621055603, 98.2674482663472, 173.137725543976, 799.694091542562,
1979.90453948975, 96.2373899141947, 76.5195069630941, 107.071737543742,
117.334686279297, 178.596295611064, 131.432039960225, 698.085577869415,
111.098560015361, 145.455252361298, 166.953725592295, 137.826267242432,
66.4942591349284, 68.727433013916, 100.242510096232, 144.259533691406,
114.181917667389, 247.367309586207, 120.674412282308, 78.9043404261271,
146.942048136393, 70.6606164296468, 106.024205525716, 176.312954584757,
414.350973242805, 66.9187454223633, 129.234864425659, 148.73065255483,
266.182005310059, 93.0142414410909, 183.795030228297, 326.882172648112,
147.11859588623, 86.8471510569255, 121.27593682607, 79.5016760508219,
43.7458829243978, 99.4407758712769, 91.0139132181803, 552.229130840302,
793.327180553618, 231.42639319102, 158.246571985881, 109.710551071167,
114.066635386149, 131.617008082072, 86.2302202860514, 146.471902608871,
65.9860282897949, 77.1377033233643, 120.221954854329, 230.028894488017,
139.479463068644, 252.868139648438, 101.069431940715, 146.539873282115,
98.0863948822021, 234.978455193837, 149.506144714355, 556.852733421326,
404.509608586629, 138.258200963338, 831.873667462667, 116.971610275904,
152.41510442098, 131.338558197021, 209.335632514954, 116.313719177246,
99.5141566814763, 156.072473526001, 94.072721463158, 353.942493120829,
43.1122990926107, 51.821037419637, 153.845387967428, 122.564227167765,
162.670629946391, 96.6421170552572, 146.714624023437, 754.268276723226,
326.58365983963, 526.089876747131, 220.558449808757, 194.481284141541,
309.92208748772, 64.6082110737645, 217.493639437358, 561.985070270041,
308.44641011556, 118.310349146525, 553.834616947174, 995.586966323852,
268.068948872884, 245.127156066895, 292.51830889384, 587.290327072144,
94.5477484385172, 171.315407927831, 85.7414679209391, 203.068407805761,
328.12893929915, 234.418685658773, 89.4927943547567, 90.1234842300415,
143.503722159068, 49.1553468068441, 62.3574542999268, 178.118514760335,
433.007931900024, 280.898192977905, 374.031456756592, 711.651745128632,
395.511139551799, 86.9262752532959, 64.8270809173584, 365.124202632904,
109.43604815801, 144.173032569885, 319.268734614054, 522.39570089976,
1167.57024243673, 177.498574701945, 131.89989233017, 123.73520673116,
93.8401836077372, 137.802650324504, 1323.29525152842, 481.451904201508,
75.3245646158854, 320.364061864217, 74.4257511138916, 149.554733339945,
52.6601121266683, 40.6143796284993, 174.994466463725, 133.051774279277,
91.320027923584, 60.1048184712728, 190.039660771688, 79.4164872487386,
199.527256393433, 156.910675112406, 57.3501522064209, 458.856181208293,
205.493201732635, 66.6323187192281, 90.9012749989827, 108.127809906006,
187.231411266327, 92.7863327026367, 400.6145500501, 1458.47393633525,
225.610383828481, 1162.78205540975, 101.861546325684, 112.598179152032,
115.326534970601, 792.106127675374, 78.182506052653, 142.994722731908,
114.599163691203, 81.95614688136, 454.689263057709, 272.196754900614,
172.234867858887, 79.090188852946, 60.8621047973633, 142.36892375946,
136.630671056112, 108.721017456055, 80.9918919881185, 1433.75189857483,
154.17805741628, 659.074712753296, 321.832610448201, 117.764425627391,
185.335022131602, 589.386794630686, 105.142744572957, 84.9865966161092,
123.877610397339, 200.095254516602, 536.631055291494, 154.485708713531,
167.286221313477, 118.206081136068, 143.717621294657, 580.479183387756,
294.481950410207, 617.171444129944, 420.962294133504, 551.718492031097,
74.5062719980876, 78.3557805379232, 257.977811940511, 446.928193664551,
380.109607696533, 119.15039905655, 63.4138678232829, 76.9588490804037,
86.2352377414703, 271.243635559082, 120.84293162028, 1264.21897061666,
783.614016977946, 176.503174654643, 93.3847297668457, 84.0048375447591,
254.118038431803, 58.532439549764, 580.196927865346, 1908.52184575399,
94.9462302525838, 995.788801701864, 127.460003852844, 111.739729309082,
93.3154925028483, 105.402665710449, 67.3679551442464, 667.920151964823,
132.222331682841, 314.550131352743, 125.439969126383, 245.486832936605,
135.780266729991, 63.4305180867513, 92.0042594909668, 236.634278615316,
112.588871510824, 97.6332377115885, 115.971070226034, 145.393367767334,
1753.44250017802, 1108.75356718699, 90.6674920082092, 97.1795349438985,
118.992028554281, 904.50049346288, 119.381271870931, 155.416779327393,
167.730931282043, 819.577843093872, 132.454986095428, 1172.10818456014,
159.41894586881, 884.243849817912, 306.197181383769, 1025.3507610321,
1764.60327707926, 216.382193628947, 207.140739695231, 123.251421610514,
41.9422114054362, 47.8952061971029, 221.255397669474, 135.320831712087,
142.811433124542, 88.3088772455851, 93.4430917104085, 122.703420066834,
90.4676535447439, 889.464371490478, 136.123736190796, 102.094382603963,
191.528504435221, 97.919792286555, 123.842847824097, 107.542417430878,
138.457771333059, 86.8440532684326, 566.943937683105, 172.956462542216,
133.171273612976, 1066.62683610916, 1479.28807779948, 663.413474782308,
62.5869406382243, 170.556084187826, 88.9210375617532, 119.178593031565,
121.796424547831, 74.0732344309489, 171.848355181077, 1071.86164665222,
145.838550376892, 57.1214060465495, 55.2998411814372, 875.875497659047,
685.174235343933, 400.217473856608, 403.290315119425, 83.7075926462809,
1502.23948465983, 1152.99484335581, 396.389808909098, 867.180078633626,
542.265283075968, 313.475647354126, 183.84946123759, 171.046878687541,
1615.21034647837, 565.397602462769, 231.644441095988, 98.6048867543538,
2023.8094441096, 676.533390172323, 1827.38857081731, 2161.20683441162,
476.566684087117, 189.834623495738, 225.848187287649, 205.142209211985,
61.0699328104655, 44.6212768554688, 117.088230832418, 131.516865158081,
178.267878119151, 71.2439846038818, 164.141000747681, 164.433491770426,
92.8048498630524, 96.652197265625, 164.696831067403, 141.26117049853,
247.047887738546, 114.367617670695, 101.617473602295, 127.334716955821,
121.043900998433, 93.7059412002563, 105.655132309596, 128.2231798172,
103.871154149373, 140.246884377797, 180.749842961629, 140.136499595642,
112.927299118042, 106.509916178385, 79.0246678670247, 144.228148301442,
116.551761945089, 102.27347946167, 125.870960267652, 94.7853925069173,
164.578140258789, 79.0429252624512, 1972.0589457194, 122.041786511739,
369.109375890096, 97.9565508524577, 115.091355260213, 95.532750193278,
254.069189675649, 216.307720947266, 160.729330571493, 63.1695140838623,
85.0233186086019, 145.837891642253, 91.8709256490072, 736.841103363037,
2203.47915471395, 108.396830374734, 643.523943837484, 124.550597000122,
1190.63865280151, 115.416636149089, 303.704389731089, 2189.46026611328,
108.91584927241, 169.70203684171, 145.46070098877, 112.336800352732,
64.0535672505697, 82.0859564463297, 160.253264172872, 100.455925242106,
146.357659626007, 139.197660509745, 106.683996804555, 164.885615158081,
89.8292344411214, 60.5612328847249, 85.9461032867432, 134.144103972117,
226.959710184733, 110.954162931442, 153.134310277303, 109.30106903712,
91.8361447970072, 160.04301923116, 301.663374519348, 112.986794090271,
132.686922136943, 143.604461415609, 115.704645411174, 147.933599821726,
55.5743167877197, 67.1098021189372, 89.241247177124, 110.448150189718,
169.692374928792, 115.605580012004, 124.19718170166, 330.440049552917,
91.5326904296875, 56.6389333089193, 1786.02195383708, 86.5874438285828,
156.664742279053, 62.0855784098307, 103.830563354492, 67.2863882700602,
113.00208307902, 148.381368478139, 112.669645182292, 93.1790322621663,
78.3713232676188, 183.600115680695, 128.752993774414, 457.350227101644,
116.084363428752, 359.977403513591, 201.936512883504, 107.643390814463,
148.457613499959, 681.094862492879, 666.461189842224, 2110.49717203776,
154.762382475535, 208.445512898763, 199.091579182943, 70.8461446126302,
41.6287618001302, 50.2445003509522, 184.277586078644, 119.773100026449,
138.845019753774, 149.363474464416, 247.919495264689, 182.973646863302,
106.992418034871, 92.1301924387614, 99.4511514027913, 178.963988494873,
197.776591237386, 162.244597752889, 172.707881291707, 144.178144963582,
105.972580432892, 146.111129379272, 94.3916324456533, 150.805790265401,
117.549604066213, 402.905239836375, 164.756610234578, 67.0433251063029,
87.0525208473206, 76.4762608846029, 66.0918374379476, 142.46309038798,
137.012873808543, 189.979556560516, 80.1035437266032, 1832.97236286799,
53.4306241353353, 57.9919812520345, 2164.05861752828, 2032.08358338674,
135.504244995117, 106.627118937174, 151.856721623739, 139.199824555715,
96.498469543457, 164.258044846853, 190.022536595662, 90.2090935266318,
111.147905476888, 131.61637468338, 109.918280792236, 96.8092498779297,
155.079161389669, 2192.35570313136, 604.995789210002, 710.493809636434,
1041.23846524556, 137.510629272461, 344.124197355906, 813.456807804108,
119.174838352203, 158.336372280121, 198.959576670329, 82.9406408945719,
83.9670051574707, 114.26588528951, 735.625413068136, 161.894551086426,
94.269957447052, 127.764249769847, 1581.1586760203, 396.851031430562,
132.310057322184, 140.464433765411, 106.86512131691, 396.206165822347,
456.767244656881, 100.793914286296, 128.28996869723, 165.424806276957,
101.875761731466, 183.429876398157, 106.684182262421, 573.012140242259,
132.556595738729, 540.070850817362, 153.95310104688, 155.44133570989,
81.7532516797384, 93.2110822041829, 869.840623855591, 250.191153685252,
146.466985321045, 151.325196901957, 94.8349501291911, 530.477550601959,
83.8890731811523, 85.972753016154, 124.086417039235, 158.129432074229,
125.661574713389, 122.254359865189, 232.337915166219, 694.527728652954,
61.8648587544759, 169.926411247253, 173.489703464508, 83.7946606000264,
100.879169782003, 129.487470753988, 106.336083889008, 1657.77897205353,
92.0838534990946, 111.986256345113, 167.409994125366, 110.449782117208,
114.257273578644, 71.94953028361, 1102.41573149363, 111.55475581487,
112.257598145803, 164.156603240967, 163.427497609456, 71.7053223927816,
81.2968568166097, 99.4956684112549, 208.845096969604, 135.467730204264,
140.953507296244, 324.049908351898, 59.1927397410075, 112.171092605591,
478.287186940511, 107.570729001363, 75.6448902130127, 1242.95099398295,
385.019252840678, 349.674844487508, 1305.79593954086, 115.85050128301,
263.044170570374, 177.332856169844, 89.311332543691, 129.490258725484,
187.667734336853, 177.645050557454, 131.238626845678, 327.157782236735,
125.69720770518, 93.1161365826925, 1425.66093190511, 634.00789680481,
125.564287185669, 169.589586385091, 143.235316610336, 1555.91611671448,
80.5914026896159, 54.1577214558919, 372.662876192729, 1459.70456546148,
380.654436620077, 156.096094767253, 232.633177312215, 271.5391497612,
86.4346197764079, 165.351640065511, 130.146297868093, 105.409268156687,
145.295665216446, 155.81127392451, 166.19502140681, 2140.03058573405,
166.903946304321, 205.310371907552, 1621.88284556071, 1396.72425104991,
204.90924911499, 82.4622472127279, 871.777214018504, 104.136891174316,
1009.75333000819, 174.4781721433, 1000.605737559, 76.7266347249349,
44.2736553192139, 62.0917179266612, 784.067453765869, 166.69429213206,
150.614153639476, 72.851985390981, 310.197018607457, 339.77388381958,
1574.97208328247, 193.468963718414, 68.0796229044596, 1153.48064489365,
1734.28912963867, 113.17360200882, 1583.38906313578, 268.441642983754,
1166.61380001704, 1776.08039053281, 107.050835768382, 124.934930833181,
174.113957850138, 186.550943215688, 352.626340007782, 1384.64960250854,
581.504852453868, 214.184818522135, 1467.33238627116, 2081.49808044434,
151.575795841217, 271.016174443563, 239.054435157776, 1362.54607607524,
47.6869219462077, 55.7247287750244, 2183.44155782064, 1481.68010384242,
197.205083719889, 889.464032173157, 1177.32970072428, 122.06503794988,
71.1776963551839, 124.467632293701, 404.724632517497, 112.117530186971,
1957.24559249878, 114.55601272583, 329.651413345337, 1345.23118553162,
1672.36527633667, 461.869095738729, 2210.82458432515, 2253.93166592916,
163.582619603475, 1095.41345799764, 416.498169612885, 169.332186985016,
2072.48261108398, 170.549760977427, 1378.48510182699, 45.7748872121175,
83.313224029541, 283.73469282786, 868.297222518921, 106.084307861328,
444.156893730164, 727.545597998301, 812.284563732147, 1631.23735249837,
1839.57751541138, 1629.11902618408, 1676.38460566203, 207.895812797546,
1244.75812441508, 132.111362012227, 578.360881964366, 1092.16455396016,
1077.15143753688, 1499.29249432882, 104.225738875071, 68.7634352684021,
163.853317769368, 1667.27491264343, 1087.82403093974, 1027.4796585083,
1372.10813719432, 1391.94022283554, 1107.00707931519, 511.409349886576,
1375.10742708842, 1486.16988220215, 1611.00738499959, 948.438569513957,
78.4655939737956, 79.5901652018229, 776.648887379964, 2094.52165629069,
1138.14126393, 1457.48078494072, 1005.25162277222, 1370.71399211884,
1177.5752881368, 707.862804444631, 703.894140310455, 150.043614705404,
493.643328348796, 437.099182383219, 2145.08214797974, 103.361178080241,
547.498029073079, 1757.47054011027, 1114.8290831248, 1317.26599820455,
116.760251108805, 1594.38252207438, 274.173648834229, 951.648400974274,
1555.49888140361, 1202.4837287267, 1130.39313557943, 86.8401330312093,
165.475286992391, 1535.25958417257, 1311.78687324524, 104.009363555908,
1330.07169205348, 556.480552736918, 837.196700414022, 1227.50419324239,
403.308845901489, 1246.16440575918, 1529.21983210246, 1149.32678426107,
217.443237876892, 60.8066343419692, 1480.65781860352, 1238.01070683797,
1201.3631216685, 1553.64361378352, 113.75926990509, 95.1211091359456,
763.428101094564, 291.093384488424, 943.14834283193, 1363.67477550507,
1681.00093129476, 1472.92611872355, 932.285478337606, 131.905737368266,
121.474915949504, 148.525496006012, 736.89859418869, 75.0870213826497,
59.935436630249, 54.1699507395426, 1168.22714875539, 2412.51519978841,
1743.93317782084, 782.366149012248, 2203.39344456991, 1421.12403996785,
1336.50701764425, 1176.95020942688, 438.213745244344, 348.247112401326,
1480.13488210042, 1798.66865094503, 1346.2985118866, 1256.41444005966,
909.471203231812, 171.40883509318, 93.4114850362142, 1841.16934115092,
354.062790425619, 1390.47627944946, 1822.17310612996, 844.123512013753,
1606.02656707764, 817.584078725179, 946.572672526042, 68.0609415690104,
58.6023214975993, 276.296709823608, 118.834905115763, 580.323159726461,
1103.61876068115, 146.368565368652, 58.998179880778, 1219.3781724294,
305.141946792603, 1053.00132700602, 1439.9614007314, 1073.76150843302,
104.637747828166, 69.1563002268473, 472.549475097656, 718.795500946045,
436.23580271403, 561.951491800944, 1075.41215089162, 43.5530652364095,
401.651103083293, 116.428274981181, 101.822636795044, 1219.36374638875,
1500.2455590566, 1186.27668266296, 915.048071670532, 66.245730304718,
1374.70722694397, 85.2924304644267, 577.220377413432, 82.1419835408529,
50.2123226165771, 50.2981887817383, 93.9227024078369, 1890.49102350871,
1595.068212382, 93.340446472168, 3389.0315709432, 107.441361967723,
1099.52866808573, 344.198207346598, 436.335192743937, 1972.17287406921,
1293.62342007955, 1394.47833353678, 1299.15391743978, 1528.931336085,
1637.98597857157, 109.223888524373, 158.672580337524, 1813.01541086833,
2153.26614583333, 1294.95476353963, 1349.21113713582, 1061.88881746928,
974.041166941325, 157.173533185323, 1008.36653137207, 58.0612944285075,
47.8481915791829, 52.2617520650228, 111.955856704712, 64.2600378672282,
929.947125752767), .Dim = c(60L, 24L), .Dimnames = list(c("2015-08-01",
"2015-08-02", "2015-08-03", "2015-08-04", "2015-08-05", "2015-08-06",
"2015-08-07", "2015-08-08", "2015-08-09", "2015-08-10", "2015-08-11",
"2015-08-12", "2015-08-13", "2015-08-14", "2015-08-15", "2015-08-16",
"2015-08-17", "2015-08-18", "2015-08-19", "2015-08-20", "2015-08-21",
"2015-08-22", "2015-08-23", "2015-08-24", "2015-08-25", "2015-08-26",
"2015-08-27", "2015-08-28", "2015-08-29", "2015-08-30", "2015-08-31",
"2015-09-01", "2015-09-02", "2015-09-03", "2015-09-04", "2015-09-05",
"2015-09-06", "2015-09-07", "2015-09-08", "2015-09-09", "2015-09-10",
"2015-09-11", "2015-09-12", "2015-09-13", "2015-09-14", "2015-09-15",
"2015-09-16", "2015-09-17", "2015-09-18", "2015-09-19", "2015-09-20",
"2015-09-21", "2015-09-22", "2015-09-23", "2015-09-24", "2015-09-25",
"2015-09-26", "2015-09-27", "2015-09-28", "2015-09-29"), c("00:00:00",
"01:00:00", "02:00:00", "03:00:00", "04:00:00", "05:00:00", "06:00:00",
"07:00:00", "08:00:00", "09:00:00", "10:00:00", "11:00:00", "12:00:00",
"13:00:00", "14:00:00", "15:00:00", "16:00:00", "17:00:00", "18:00:00",
"19:00:00", "20:00:00", "21:00:00", "22:00:00", "23:00:00")))
两个月的数据如下:
<name of the solution>
答案 0 :(得分:0)
我不知道为什么apply.monthly
无效,但是从link开始
我使用了split
,如下所示
do.call(rbind,lapply(split(as.xts(data),'months'), outliersco))
这完美无缺