提问人:Antonio Manco 提问时间:11/16/2023 最后编辑:Antonio Manco 更新时间:11/17/2023 访问量:80
在 R 中使用日期和时间填充时间序列中的缺失点
Filling missing points in a timeseries with Date and Time in R
问:
我有一个数据集,其中包含超过 3 个月的数据,每 6 小时一个点。 所以我一天有 4 个数据点。 我有一些仪器问题的漏洞。 没有数据点没关系,但我需要有时间序列中缺失的点,也有一个 NaN 值。 我不知道如何填补这个空间。 我简要地介绍了这个结构
structure(list(Datetime = structure(c(1688085261, 1688106892,
1688128522, 1688150134, 1688171767, 1688193399, 1688215049, 1688236681,
1688258314, 1688279926, 1688301559, 1688323191, 1688344840, 1688366455,
1688388103, 1688409734, 1688431365, 1688452997, 1688474627, 1688496259,
1688517891, 1688539524, 1688561156, 1688582787, 1688604419.99,
1688626053, 1688647685, 1688669317, 1688690950, 1688712587, 1688733483,
1688755133, 1688776766, 1688798398, 1688820030, 1688841661, 1688863294,
1688884924, 1688906556, 1688928169, 1688949819, 1688971432, 1688993082,
1689014713, 1689036346, 1689057979, 1689079610, 1689101243, 1689257000,
1689278632, 1689300246, 1689321896, 1689337999, 1689359630, 1689381261,
1689402892, 1689424523, 1689446153, 1689467782, 1689489414, 1689511045,
1689532676, 1689554309, 1689575940, 1689597573, 1689619206, 1689640840,
1689662473, 1689684106, 1689705738, 1689727361, 1689748985, 1689770607,
1689792230, 1689813854, 1689835477, 1689857100, 1689878723, 1689900345,
1689921967, 1689943572, 1689965213, 1689986837.99, 1690008462,
1690030086, 1690051709, 1690073331, 1690094955, 1690116576, 1690138201,
1690159826, 1690181450, 1690203073, 1690224697, 1690246305, 1690267944,
1690288392, 1690310014, 1690331638, 1690353258, 1690374879, 1690396503,
1690418126, 1690439749, 1690461199, 1690482831, 1690504465, 1690526103,
1690547736, 1690569369, 1690591003, 1690612636, 1690634268, 1690655901,
1690677534, 1690699166, 1690720796, 1690742427, 1690764059, 1690785689,
1690807322, 1690828954, 1690850584, 1690872215, 1690893848, 1690915480,
1690937095, 1690958742, 1690980376, 1691002005, 1691023638, 1691045253,
1691066885, 1691088537, 1691110169, 1691131802, 1691153434, 1691175067,
1691196697, 1691218311, 1691239961, 1691261594, 1691283226, 1691304859,
1691326490, 1691348122, 1691369739, 1691391389, 1691413021, 1691434635,
1691456285, 1691477916, 1691499549, 1691521180, 1691542794, 1691564444,
1691586077, 1691607710, 1691629327, 1691650977, 1691672609, 1691694241,
1691715875, 1691737491, 1691759123, 1691780773, 1691802407, 1691824041,
1691845674, 1691867307, 1691888922, 1691910555, 1691932206, 1691953839,
1691975471, 1691997103, 1692018718, 1692040368, 1692062001, 1692083634,
1692105267, 1692126899.99, 1692148531, 1692170164, 1692191798,
1692213431, 1692235063, 1692256695, 1692278328, 1692299962, 1692321596,
1692642800, 1692664436, 1692686067, 1692707696, 1692729328, 1692750958,
1692772590, 1692794223, 1692815854, 1692837485, 1692859117, 1692880749,
1692902382, 1692924015, 1692945647, 1692967279, 1692988911, 1693010525,
1693032174, 1693053804, 1693075435, 1693097048, 1693118703, 1693140342,
1693161975, 1693183614, 1693205253, 1693226890, 1693248522, 1693270156,
1693291789, 1693313426, 1693335058, 1693356690, 1693378323, 1693399957,
1693421589, 1693443226, 1693464864, 1693486501, 1693508133, 1693529769,
1693551412, 1693573050, 1693594686, 1693616322, 1693637940, 1693659594,
1693681231, 1693702868, 1693724505, 1693746144, 1693767781, 1693789420,
1693811058, 1693832701, 1693854333, 1693875986, 1693897645, 1693916439,
1693938090, 1693959742, 1693981383, 1694003035, 1694024676, 1694046329,
1694067987, 1694089639, 1694111272, 1694132927, 1694154565, 1694176210,
1694197864, 1694219510, 1694241147, 1694262802, 1694284443, 1694306095,
1694327742, 1694349380, 1694371023, 1694392679, 1694414325, 1694435968,
1694457612, 1694479259, 1694500913, 1694522564, 1694544211, 1694565856,
1694587510, 1694609156, 1694630795, 1694652450, 1694674087, 1694695732,
1694717388, 1694739025, 1694760680, 1694782328, 1694803975, 1694825622,
1694847277, 1694868923, 1694890568, 1694912211, 1694933848, 1694955504,
1694977140, 1694998795, 1695020437, 1695042084, 1695063731, 1695085369,
1695107017, 1695128671, 1695150317, 1695171963, 1695193610, 1695215248,
1695236903, 1695258550, 1695280198, 1695301845, 1695323492, 1695345138,
1695366785, 1695388421, 1695410078), class = c("POSIXct", "POSIXt"
), tzone = "UTC"), CO2_B = c(2.37945844, 2.78306944, 3.24037287,
2.58560516, 2.47793123, 3.03796434, 2.60713745, 2.49864698, 2.29261307,
3.05987591, 3.1408233, 3.00164821, 2.56353669, 2.48692118, 2.9811499,
2.72509617, 2.48637517, 2.45202609, 3.11129387, 2.85666942, 2.70435732,
3.02732735, 3.31205469, 2.92671771, 2.46088365, 2.73491596, 3.18625977,
2.88077903, 2.53932589, 2.87649197, 5.78558248, 3.39646117, 2.50203712,
2.33915991, 3.5735323, 2.87248647, 2.35225816, 2.53840711, 3.14015425,
2.94740058, 2.44512979, 2.52158394, 4.81956132, 3.27594268, 2.51890644,
2.60967934, 2.86068756, 3.03657847, 3.87108713, 2.96925355, 2.26053988,
2.70190666, 3.01921045, 2.53213186, 2.70804301, 2.64689395, 3.139396,
2.95109581, 2.56879052, 2.60640405, 3.54651982, 3.11179001, 2.35305099,
2.57449849, 3.33883221, 3.15170793, 2.41671403, 2.54164284, 6.94244115,
3.64267315, 2.89990734, 2.71048322, 3.90907737, 3.37550439, 3.02536806,
2.88180359, 3.73526018, 3.13310299, 2.81218778, 5.85877833, 4.39357689,
3.57245726, 2.68519044, 2.56044878, 3.46130493, 3.28864885, 2.55656481,
2.5626052, 3.71863133, 3.41014264, 2.46874297, 2.61884941, 3.53930476,
3.07394231, 2.55274294, 2.23406215, 2.4528281, 2.31213441, 2.16130443,
1.78197081, 5.73435583, 2.50417021, 1.98631971, 1.89492405, 4.30249805,
2.93106408, 2.00939817, 4.62568746, 2.96980568, 2.48328914, 1.7626972,
1.73880611, 3.5952141, 3.0458255, 2.1259389, 2.13861426, 3.22560407,
2.88591732, 2.38192367, 1.95162337, 2.9688135, 2.61705151, 2.47093558,
2.9245237, 4.09443592, 2.84193431, 2.27533311, 2.02805933, 3.71365926,
2.77256854, 2.38381449, 2.05249523, 4.03229169, 3.06758446, 2.34272115,
4.55709201, 3.69335381, 2.9317457, 1.08784785, 1.47326979, 2.20794366,
1.98522693, 1.49545004, 1.43190753, 2.50744537, 2.85324455, 2.32375874,
2.04855838, 3.56315426, 2.54534863, 1.99120387, 1.7770102, 2.9489083,
2.2693575, 1.95150435, 1.50281235, 3.6471243, 2.11240864, 1.60748834,
1.30441338, 3.17593848, 2.40549684, 1.72265148, 1.66162629, 4.61151773,
2.29593825, 1.56656697, 1.37648668, 3.00673555, 2.22630226, 1.69687376,
1.57110213, 2.76168566, 2.21249614, 1.53044735, 2.42823682, 3.08573917,
2.34058818, 1.77633471, 1.57544415, 3.10237654, 2.27145523, 1.70796403,
1.73201743, 2.71681306, 2.03476082, 1.48967509, 1.72776782, 5.80509668,
2.53615895, 1.88053425, 2.50256044, 1.95910795, 1.80056076, 2.43353352,
2.23639009, 1.87980749, 1.7507009, 2.3330964, 2.34117314, 1.72878793,
1.54777574, 5.59039136, 2.5059594, 1.80363684, 1.64019157, 2.75825295,
2.48766937, 1.92457186, 1.93033459, 2.63956678, 2.26933623, 1.72928247,
1.61017065, 2.27838724, 2.00569276, 1.42688126, 1.43023456, 2.22467001,
1.81061373, 1.4532811, 1.33982804, 1.93056838, 1.47982785, 1.39536139,
2.60479996, 2.49143524, 1.61871585, 1.19760616, 1.0453358, 1.7046607,
1.66234619, 1.2162714, 1.24668617, 3.08377973, 1.83578199, 1.15928302,
1.20659348, 2.48603655, 1.94650247, 1.41442428, 1.3437734, 2.48735207,
1.85275679, 1.48198555, 1.27391129, 1.79132538, 1.11742666, 1.09183998,
1.08512705, 3.50043381, 2.4754174, 1.58289519, 1.87787252, 2.14757616,
1.71937741, 1.38524289, 5.50343451, 5.52773172, 1.89779437, 1.36443464,
1.23105911, 1.99452956, 1.46427826, 1.44176246, 1.24269269, 2.20755237,
1.83202904, 1.38095731, 1.29357804, 2.23743046, 1.72952055, 1.23216155,
1.1269867, 3.87726262, 1.9378016, 1.23044142, 1.1512899, 2.67616393,
1.6074028, 0.87359235, 1.04240268, 2.44414241, 1.55885266, 1.28142441,
1.29140425, 1.92672624, 2.17131073, 1.43877928, 1.19278556, 2.6984511,
1.87160787, 1.1441474, 1.2491042, 1.71750655, 1.51176727, 1.67517886,
1.39726141, 2.31140309, 1.52484083, 1.14336398, 1.43938781, 3.81083134,
1.85771523, 1.26312211, 1.17696066, 2.60402764, 1.67144319, 1.28138787,
1.37550466, 1.84351722, 1.82685883, 1.53303749, 1.11018471, 1.9570172,
1.5667831, 1.44953307, 1.34242726, 2.01983618, 2.14082141), CO2_C = c(2.24160596,
2.42278855, 2.48573403, 2.31948849, 2.29890391, 2.36781003, 2.20390185,
1.9725799, 1.94605203, 2.40117675, 2.07161113, 2.10033642, 1.76023781,
2.25551487, 2.20110841, 1.94957149, 1.94953093, 2.23568358, 2.20892352,
2.4043906, 2.03812259, 2.69597583, 3.04789357, 2.48876632, 2.27416772,
2.53722918, 2.56265566, 2.35316972, 1.86765384, 5.16411005, 2.49798275,
1.58135755, 1.6440026, 3.2782156, 2.88467928, 2.11771615, 2.41275541,
4.10138407, 3.55280901, 2.51681839, 2.75972222, 5.41162, 2.86226704,
2.10729162, 1.99668596, 3.09826083, 2.76773652, 4.88547302, 2.16970129,
1.5098549, 2.2984534, 2.9919973, 2.79955535, 1.87958131, 2.13794065,
3.14011375, 2.8989251, 2.00127695, 2.13322636, 3.14530313, 2.8077165,
1.77550832, 2.24076887, 3.1759559, 2.68074628, 1.89528342, 2.22671344,
5.08126786, 2.60730828, 1.99200237, 1.91916867, 3.22275673, 3.01617353,
2.4482067, 2.39956749, 3.33484642, 2.95019096, 2.55578599, 8.87898359,
4.16620877, 2.77214376, 2.12165786, 2.03176967, 3.38806748, 2.95551955,
2.26026151, 2.3617654, 3.40297496, 2.91829566, 2.11770998, 2.28682218,
3.4712133, 2.78356588, 2.28344597, 2.16046768, 2.73694626, 2.39073146,
1.91409872, 1.79769719, 5.23179741, 2.18150543, 1.85368752, 1.65493764,
4.24034466, 2.40462344, 1.78261557, 5.33654082, 2.61354374, 2.23634097,
0.8139261, 1.51317935, 3.0011946, NaN, 1.23291007, NaN, 3.26310198,
2.75888912, 2.19620874, 1.94480558, 3.18520053, 2.68568215, 2.18516884,
4.7810355, NaN, 0.47125431, 0.94651273, 0.52927391, 7.98622666,
1.89955988, 1.45945858, 1.2546542, 2.70332173, 2.39278843, 1.85935117,
7.55656867, 2.87248322, 2.18188878, 0.28476099, 0.53640426, 1.21017633,
0.96489476, 1.05827157, 1.12748403, 1.95247716, 1.92841194, 1.60829854,
1.54026566, 2.32163282, 2.1068724, 1.71025564, 1.5586972, 2.62275187,
1.97402004, 1.45509033, 1.34369927, 2.67570588, 1.50089775, 0.97211471,
1.01649398, 2.40021633, 1.92578309, 1.47622737, 1.47971085, 3.49181633,
1.59261866, 1.22453331, 1.12530048, 2.53737101, 2.12048972, 1.59154236,
1.33522252, 2.55057209, 2.01753299, 1.45118778, 2.70940153, 2.43776118,
1.79693503, 1.46530427, 1.27045459, 2.46921191, 2.11044421, 1.60460228,
1.37759708, 2.37151657, 1.98174184, 1.68062101, 1.57477944, 4.1590178,
1.76690159, NaN, 1.37147218, 0.6730865, NaN, 2.35021349, 1.85453206,
1.78164746, 2.51736569, 2.14282659, 1.76114656, 1.85840523, 9.04934784,
1.95124436, 1.42082718, 1.39776209, 2.27148326, 2.1318257, 1.87414528,
1.61305648, 2.4786769, 2.16123401, 1.67928333, 1.6790784, 2.34602876,
2.00834093, 1.57030435, 1.41844828, 1.78303105, 1.57049364, 1.33119839,
1.42795602, 1.72016492, 1.3495883, 1.39291847, 9.89920987, 2.57792347,
1.37453228, 1.0044393, 0.83451231, 1.55311221, 1.25856817, 0.92478042,
0.87460879, 3.12687228, 1.21880996, 0.77445948, 0.76482777, 1.73887796,
1.24076553, 0.97756203, 0.9909099, 1.99516104, 1.57255717, 1.32054006,
1.16349561, 1.96896625, NaN, 1.89072157, 1.68240736, 3.64180529,
2.20466293, 1.25700563, 2.33761353, 2.39122385, NaN, 0.38585941,
NaN, 3.97340966, 2.33116223, 1.66629612, 1.45008254, 2.74217919,
1.59611667, 1.19680148, 1.18842868, 2.2216571, 1.41526544, 1.32188882,
1.20107015, 2.16701728, 1.63383266, 1.26748549, 1.34390836, 3.86943754,
1.49579507, 1.17096663, 1.16436239, 2.49238173, 1.57718906, 1.08147786,
1.32665322, 2.31067166, 1.59086154, 1.5673111, 1.56408657, 3.20510624,
2.22657466, 1.65296984, 1.37424595, 2.46565151, 1.56177872, 1.33041124,
1.26945934, 1.82245528, 1.60163064, 1.4912671, 1.28480613, 2.05911073,
1.41854127, 1.32698115, 1.44689801, 3.46598139, 1.67798472, 1.34523501,
1.2761992, 1.86752296, 1.5371493, 1.31560451, 1.44410222, 1.47471455,
1.53124803, 1.4677739, 1.7102374, 2.15021362, 1.66733529, 1.7423732,
1.50556735, 1.61367568, 1.62600443, 1.66443, 2.02318432)), row.names = c(38L,
47L, 56L, 65L, 74L, 83L, 92L, 101L, 110L, 119L, 128L, 137L, 146L,
155L, 164L, 173L, 182L, 191L, 200L, 209L, 218L, 227L, 236L, 245L,
254L, 263L, 272L, 281L, 290L, 299L, 306L, 315L, 324L, 333L, 342L,
351L, 360L, 369L, 378L, 387L, 396L, 405L, 414L, 423L, 432L, 441L,
450L, 459L, 469L, 478L, 487L, 496L, 505L, 514L, 523L, 532L, 541L,
550L, 559L, 568L, 577L, 586L, 595L, 604L, 613L, 622L, 631L, 640L,
649L, 658L, 667L, 676L, 685L, 694L, 703L, 712L, 721L, 730L, 739L,
748L, 757L, 766L, 775L, 784L, 793L, 802L, 811L, 820L, 829L, 838L,
847L, 856L, 865L, 874L, 883L, 892L, 901L, 910L, 919L, 928L, 937L,
946L, 955L, 964L, 973L, 982L, 991L, 1000L, 1009L, 1018L, 1027L,
1036L, 1045L, 1054L, 1063L, 1072L, 1081L, 1090L, 1099L, 1108L,
1117L, 1126L, 1135L, 1144L, 1153L, 1162L, 1171L, 1180L, 1189L,
1198L, 1207L, 1216L, 1225L, 1234L, 1243L, 1252L, 1261L, 1270L,
1279L, 1288L, 1297L, 1306L, 1315L, 1324L, 1333L, 1342L, 1351L,
1360L, 1369L, 1378L, 1387L, 1396L, 1405L, 1414L, 1423L, 1432L,
1441L, 1450L, 1459L, 1468L, 1477L, 1486L, 1495L, 1504L, 1513L,
1522L, 1531L, 1540L, 1549L, 1558L, 1567L, 1576L, 1585L, 1594L,
1603L, 1612L, 1621L, 1630L, 1639L, 1648L, 1657L, 1666L, 1675L,
1684L, 1693L, 1702L, 1711L, 1720L, 1729L, 1738L, 1747L, 1755L,
1764L, 1773L, 1782L, 1791L, 1800L, 1809L, 1818L, 1827L, 1836L,
1845L, 1854L, 1863L, 1872L, 1881L, 1890L, 1899L, 1908L, 1917L,
1926L, 1935L, 1944L, 1953L, 1962L, 1971L, 1980L, 1989L, 1998L,
2007L, 2016L, 2025L, 2034L, 2043L, 2052L, 2061L, 2070L, 2079L,
2088L, 2097L, 2106L, 2115L, 2124L, 2133L, 2142L, 2151L, 2160L,
2169L, 2178L, 2187L, 2196L, 2205L, 2214L, 2223L, 2232L, 2241L,
2250L, 2259L, 2268L, 2277L, 2286L, 2295L, 2304L, 2313L, 2322L,
2331L, 2340L, 2349L, 2358L, 2367L, 2376L, 2385L, 2394L, 2403L,
2412L, 2421L, 2430L, 2439L, 2448L, 2457L, 2466L, 2475L, 2484L,
2493L, 2502L, 2511L, 2520L, 2529L, 2538L, 2547L, 2556L, 2565L,
2574L, 2583L, 2592L, 2601L, 2610L, 2619L, 2628L, 2637L, 2646L,
2655L, 2664L, 2673L, 2682L, 2691L, 2700L, 2709L, 2718L, 2727L,
2736L, 2745L, 2754L, 2763L, 2772L, 2781L, 2790L, 2799L, 2808L,
2817L, 2826L, 2835L, 2844L, 2853L, 2862L, 2871L, 2880L, 2889L,
2898L, 2907L), class = "data.frame")
因此,如果我没有一天,我需要以相同的速度(每 6 小时一个点)填充当天的时间进度。 例如在这一点上
423 2023-07-10 18:45:13 3.2759427 2.1072916
432 2023-07-11 00:45:46 2.5189064 1.9966860
441 2023-07-11 06:46:19 2.6096793 3.0982608
450 2023-07-11 12:46:50 2.8606876 2.7677365
459 2023-07-11 18:47:23 3.0365785 4.8854730
469 2023-07-13 14:03:20 3.8710871 2.1697013
478 2023-07-13 20:03:52 2.9692535 1.5098549
487 2023-07-14 02:04:06 2.2605399 2.2984534
496 2023-07-14 08:04:56 2.7019067 2.9919973
505 2023-07-14 12:33:19 3.0192105 2.7995553
514 2023-07-14 18:33:50 2.5321319 1.8795813
如您所见,我在时间序列中没有 2023-07-12,也没有 2023-07-13 的 4 分
我只用日期解决了它,是我无法复制的每小时和平。
F3MC_New=F3MC %>%
mutate(Datetime = as.Date(Datetime)) %>%
complete(Datetime = seq.Date(min(Datetime), max(Datetime), by="day" ))
使用此代码,我可以填充缺失的日期,但只需一个点,每天复制 4 个点。所以我有一行来替换缺失的一天 2023-07-12,代码没有替换 2023-07-13 的两个缺失点。
我与你分享结果。
structure(list(Datetime = structure(c(19538, 19538, 19538, 19538,
19539, 19539, 19539, 19539, 19540, 19540, 19540, 19540, 19541,
19541, 19541, 19541, 19542, 19542, 19542, 19542, 19543, 19543,
19543, 19543, 19544, 19544, 19544, 19544, 19545, 19545, 19545,
19545, 19546, 19546, 19546, 19546, 19547, 19547, 19547, 19547,
19548, 19548, 19548, 19548, 19549, 19549, 19549, 19549, 19550,
19551, 19551, 19552, 19552, 19552, 19552, 19553, 19553, 19553,
19553, 19554, 19554, 19554, 19554, 19555, 19555, 19555, 19555,
19556, 19556, 19556, 19556, 19557, 19557, 19557, 19557, 19558,
19558, 19558, 19558, 19559, 19559, 19559, 19559, 19560, 19560,
19560, 19560, 19561, 19561, 19561, 19561, 19562, 19562, 19562,
19562, 19563, 19563, 19563, 19563, 19564, 19564, 19564, 19564,
19565, 19565, 19565, 19565, 19566, 19566, 19566, 19566, 19567,
19567, 19567, 19567, 19568, 19568, 19568, 19568, 19569, 19569,
19569, 19569, 19570, 19570, 19570, 19570, 19571, 19571, 19571,
19571, 19572, 19572, 19572, 19572, 19573, 19573, 19573, 19573,
19574, 19574, 19574, 19574, 19575, 19575, 19575, 19575, 19576,
19576, 19576, 19576, 19577, 19577, 19577, 19577, 19578, 19578,
19578, 19578, 19579, 19579, 19579, 19579, 19580, 19580, 19580,
19580, 19581, 19581, 19581, 19581, 19582, 19582, 19582, 19582,
19583, 19583, 19583, 19583, 19584, 19584, 19584, 19584, 19585,
19585, 19585, 19585, 19586, 19586, 19586, 19586, 19587, 19588,
19589, 19590, 19591, 19591, 19591, 19591, 19592, 19592, 19592,
19592, 19593, 19593, 19593, 19593, 19594, 19594, 19594, 19594,
19595, 19595, 19595, 19595, 19596, 19596, 19596, 19596, 19597,
19597, 19597, 19597, 19598, 19598, 19598, 19598, 19599, 19599,
19599, 19599, 19600, 19600, 19600, 19600, 19601, 19601, 19601,
19601, 19602, 19602, 19602, 19602, 19603, 19603, 19603, 19603,
19604, 19604, 19604, 19604, 19605, 19605, 19605, 19605, 19606,
19606, 19606, 19606, 19607, 19607, 19607, 19607, 19608, 19608,
19608, 19608, 19609, 19609, 19609, 19609, 19610, 19610, 19610,
19610, 19611, 19611, 19611, 19611, 19612, 19612, 19612, 19612,
19613, 19613, 19613, 19613, 19614, 19614, 19614, 19614, 19615,
19615, 19615, 19615, 19616, 19616, 19616, 19616, 19617, 19617,
19617, 19617, 19618, 19618, 19618, 19618, 19619, 19619, 19619,
19619, 19620, 19620, 19620, 19620, 19621, 19621, 19621, 19621,
19622, 19622, 19622, 19622), class = "Date"), CO2_B = c(2.37945844,
2.78306944, 3.24037287, 2.58560516, 2.47793123, 3.03796434, 2.60713745,
2.49864698, 2.29261307, 3.05987591, 3.1408233, 3.00164821, 2.56353669,
2.48692118, 2.9811499, 2.72509617, 2.48637517, 2.45202609, 3.11129387,
2.85666942, 2.70435732, 3.02732735, 3.31205469, 2.92671771, 2.46088365,
2.73491596, 3.18625977, 2.88077903, 2.53932589, 2.87649197, 5.78558248,
3.39646117, 2.50203712, 2.33915991, 3.5735323, 2.87248647, 2.35225816,
2.53840711, 3.14015425, 2.94740058, 2.44512979, 2.52158394, 4.81956132,
3.27594268, 2.51890644, 2.60967934, 2.86068756, 3.03657847, NA,
3.87108713, 2.96925355, 2.26053988, 2.70190666, 3.01921045, 2.53213186,
2.70804301, 2.64689395, 3.139396, 2.95109581, 2.56879052, 2.60640405,
3.54651982, 3.11179001, 2.35305099, 2.57449849, 3.33883221, 3.15170793,
2.41671403, 2.54164284, 6.94244115, 3.64267315, 2.89990734, 2.71048322,
3.90907737, 3.37550439, 3.02536806, 2.88180359, 3.73526018, 3.13310299,
2.81218778, 5.85877833, 4.39357689, 3.57245726, 2.68519044, 2.56044878,
3.46130493, 3.28864885, 2.55656481, 2.5626052, 3.71863133, 3.41014264,
2.46874297, 2.61884941, 3.53930476, 3.07394231, 2.55274294, 2.23406215,
2.4528281, 2.31213441, 2.16130443, 1.78197081, 5.73435583, 2.50417021,
1.98631971, 1.89492405, 4.30249805, 2.93106408, 2.00939817, 4.62568746,
2.96980568, 2.48328914, 1.7626972, 1.73880611, 3.5952141, 3.0458255,
2.1259389, 2.13861426, 3.22560407, 2.88591732, 2.38192367, 1.95162337,
2.9688135, 2.61705151, 2.47093558, 2.9245237, 4.09443592, 2.84193431,
2.27533311, 2.02805933, 3.71365926, 2.77256854, 2.38381449, 2.05249523,
4.03229169, 3.06758446, 2.34272115, 4.55709201, 3.69335381, 2.9317457,
1.08784785, 1.47326979, 2.20794366, 1.98522693, 1.49545004, 1.43190753,
2.50744537, 2.85324455, 2.32375874, 2.04855838, 3.56315426, 2.54534863,
1.99120387, 1.7770102, 2.9489083, 2.2693575, 1.95150435, 1.50281235,
3.6471243, 2.11240864, 1.60748834, 1.30441338, 3.17593848, 2.40549684,
1.72265148, 1.66162629, 4.61151773, 2.29593825, 1.56656697, 1.37648668,
3.00673555, 2.22630226, 1.69687376, 1.57110213, 2.76168566, 2.21249614,
1.53044735, 2.42823682, 3.08573917, 2.34058818, 1.77633471, 1.57544415,
3.10237654, 2.27145523, 1.70796403, 1.73201743, 2.71681306, 2.03476082,
1.48967509, 1.72776782, 5.80509668, 2.53615895, 1.88053425, NA,
NA, 2.50256044, 1.95910795, 1.80056076, 2.43353352, 2.23639009,
1.87980749, 1.7507009, 2.3330964, 2.34117314, 1.72878793, 1.54777574,
5.59039136, 2.5059594, 1.80363684, 1.64019157, 2.75825295, 2.48766937,
1.92457186, 1.93033459, 2.63956678, 2.26933623, 1.72928247, 1.61017065,
2.27838724, 2.00569276, 1.42688126, 1.43023456, 2.22467001, 1.81061373,
1.4532811, 1.33982804, 1.93056838, 1.47982785, 1.39536139, 2.60479996,
2.49143524, 1.61871585, 1.19760616, 1.0453358, 1.7046607, 1.66234619,
1.2162714, 1.24668617, 3.08377973, 1.83578199, 1.15928302, 1.20659348,
2.48603655, 1.94650247, 1.41442428, 1.3437734, 2.48735207, 1.85275679,
1.48198555, 1.27391129, 1.79132538, 1.11742666, 1.09183998, 1.08512705,
3.50043381, 2.4754174, 1.58289519, 1.87787252, 2.14757616, 1.71937741,
1.38524289, 5.50343451, 5.52773172, 1.89779437, 1.36443464, 1.23105911,
1.99452956, 1.46427826, 1.44176246, 1.24269269, 2.20755237, 1.83202904,
1.38095731, 1.29357804, 2.23743046, 1.72952055, 1.23216155, 1.1269867,
3.87726262, 1.9378016, 1.23044142, 1.1512899, 2.67616393, 1.6074028,
0.87359235, 1.04240268, 2.44414241, 1.55885266, 1.28142441, 1.29140425,
1.92672624, 2.17131073, 1.43877928, 1.19278556, 2.6984511, 1.87160787,
1.1441474, 1.2491042, 1.71750655, 1.51176727, 1.67517886, 1.39726141,
2.31140309, 1.52484083, 1.14336398, 1.43938781, 3.81083134, 1.85771523,
1.26312211, 1.17696066, 2.60402764, 1.67144319, 1.28138787, 1.37550466,
1.84351722, 1.82685883, 1.53303749, 1.11018471, 1.9570172, 1.5667831,
1.44953307, 1.34242726, 2.01983618, 2.14082141), CO2_C = c(2.24160596,
2.42278855, 2.48573403, 2.31948849, 2.29890391, 2.36781003, 2.20390185,
1.9725799, 1.94605203, 2.40117675, 2.07161113, 2.10033642, 1.76023781,
2.25551487, 2.20110841, 1.94957149, 1.94953093, 2.23568358, 2.20892352,
2.4043906, 2.03812259, 2.69597583, 3.04789357, 2.48876632, 2.27416772,
2.53722918, 2.56265566, 2.35316972, 1.86765384, 5.16411005, 2.49798275,
1.58135755, 1.6440026, 3.2782156, 2.88467928, 2.11771615, 2.41275541,
4.10138407, 3.55280901, 2.51681839, 2.75972222, 5.41162, 2.86226704,
2.10729162, 1.99668596, 3.09826083, 2.76773652, 4.88547302, NA,
2.16970129, 1.5098549, 2.2984534, 2.9919973, 2.79955535, 1.87958131,
2.13794065, 3.14011375, 2.8989251, 2.00127695, 2.13322636, 3.14530313,
2.8077165, 1.77550832, 2.24076887, 3.1759559, 2.68074628, 1.89528342,
2.22671344, 5.08126786, 2.60730828, 1.99200237, 1.91916867, 3.22275673,
3.01617353, 2.4482067, 2.39956749, 3.33484642, 2.95019096, 2.55578599,
8.87898359, 4.16620877, 2.77214376, 2.12165786, 2.03176967, 3.38806748,
2.95551955, 2.26026151, 2.3617654, 3.40297496, 2.91829566, 2.11770998,
2.28682218, 3.4712133, 2.78356588, 2.28344597, 2.16046768, 2.73694626,
2.39073146, 1.91409872, 1.79769719, 5.23179741, 2.18150543, 1.85368752,
1.65493764, 4.24034466, 2.40462344, 1.78261557, 5.33654082, 2.61354374,
2.23634097, 0.8139261, 1.51317935, 3.0011946, NaN, 1.23291007,
NaN, 3.26310198, 2.75888912, 2.19620874, 1.94480558, 3.18520053,
2.68568215, 2.18516884, 4.7810355, NaN, 0.47125431, 0.94651273,
0.52927391, 7.98622666, 1.89955988, 1.45945858, 1.2546542, 2.70332173,
2.39278843, 1.85935117, 7.55656867, 2.87248322, 2.18188878, 0.28476099,
0.53640426, 1.21017633, 0.96489476, 1.05827157, 1.12748403, 1.95247716,
1.92841194, 1.60829854, 1.54026566, 2.32163282, 2.1068724, 1.71025564,
1.5586972, 2.62275187, 1.97402004, 1.45509033, 1.34369927, 2.67570588,
1.50089775, 0.97211471, 1.01649398, 2.40021633, 1.92578309, 1.47622737,
1.47971085, 3.49181633, 1.59261866, 1.22453331, 1.12530048, 2.53737101,
2.12048972, 1.59154236, 1.33522252, 2.55057209, 2.01753299, 1.45118778,
2.70940153, 2.43776118, 1.79693503, 1.46530427, 1.27045459, 2.46921191,
2.11044421, 1.60460228, 1.37759708, 2.37151657, 1.98174184, 1.68062101,
1.57477944, 4.1590178, 1.76690159, NaN, 1.37147218, NA, NA, 0.6730865,
NaN, 2.35021349, 1.85453206, 1.78164746, 2.51736569, 2.14282659,
1.76114656, 1.85840523, 9.04934784, 1.95124436, 1.42082718, 1.39776209,
2.27148326, 2.1318257, 1.87414528, 1.61305648, 2.4786769, 2.16123401,
1.67928333, 1.6790784, 2.34602876, 2.00834093, 1.57030435, 1.41844828,
1.78303105, 1.57049364, 1.33119839, 1.42795602, 1.72016492, 1.3495883,
1.39291847, 9.89920987, 2.57792347, 1.37453228, 1.0044393, 0.83451231,
1.55311221, 1.25856817, 0.92478042, 0.87460879, 3.12687228, 1.21880996,
0.77445948, 0.76482777, 1.73887796, 1.24076553, 0.97756203, 0.9909099,
1.99516104, 1.57255717, 1.32054006, 1.16349561, 1.96896625, NaN,
1.89072157, 1.68240736, 3.64180529, 2.20466293, 1.25700563, 2.33761353,
2.39122385, NaN, 0.38585941, NaN, 3.97340966, 2.33116223, 1.66629612,
1.45008254, 2.74217919, 1.59611667, 1.19680148, 1.18842868, 2.2216571,
1.41526544, 1.32188882, 1.20107015, 2.16701728, 1.63383266, 1.26748549,
1.34390836, 3.86943754, 1.49579507, 1.17096663, 1.16436239, 2.49238173,
1.57718906, 1.08147786, 1.32665322, 2.31067166, 1.59086154, 1.5673111,
1.56408657, 3.20510624, 2.22657466, 1.65296984, 1.37424595, 2.46565151,
1.56177872, 1.33041124, 1.26945934, 1.82245528, 1.60163064, 1.4912671,
1.28480613, 2.05911073, 1.41854127, 1.32698115, 1.44689801, 3.46598139,
1.67798472, 1.34523501, 1.2761992, 1.86752296, 1.5371493, 1.31560451,
1.44410222, 1.47471455, 1.53124803, 1.4677739, 1.7102374, 2.15021362,
1.66733529, 1.7423732, 1.50556735, 1.61367568, 1.62600443, 1.66443,
2.02318432)), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA,
-323L))
有什么帮助吗? 谢谢
答:
我有一些仪器问题的漏洞。没有数据点没关系,但我需要有时间序列中缺失的点,也有一个 NaN 值
{zoo}
就是为此而生的。我将展示如何操作,但首先让我们看一下提到的日期:
library(dplyr)
library(lubridate)
data |>
mutate(Date = lubridate::date(Datetime)) |>
filter(Date == "2023-07-12")
[1] Datetime CO2_B CO2_C Date
<0 rows> (or 0-length row.names)
它不见了。
建议的方法:
library(zoo)
data$Datetime <- lubridate::floor_date(data$Datetime, unit = "hours") # (0)
data <- zoo::read.zoo(data) # (1)
artificial_ts <- zoo::zoo(, seq(
from = min(time(data)), to = max(time(data)), by = "6 hour")) # (2)
data <- merge(data, artificial_ts) # (3)
data <- zoo::fortify.zoo(data) # (4)
解释
(0) 我们需要对现有时间序列进行基础测试,以便在将观测到的时间序列与人工时间序列合并时,后者不会引入额外的观测值,这将导致每天的观测值超过四次。
(1)逐个班级的胁迫。
(2) 根据 、 和“每 6 小时”的信息创建合成时间序列。
(3) 合并,以便添加缺失的行。
(4) 强制返回您喜欢的类,其中重命名为 。Datetimes
data
data.frame
zoo
artificial_ts
min(Datetime)
max(Datetime)
data
artificial_ts
data
data.frame
Datetime
Index
“2023-07-12”的结果:
> data |>
+ mutate(Date = lubridate::date(Index)) |>
+ filter(Date == "2023-07-12")
Index CO2_B CO2_C Date
1 2023-07-12 00:00:00 NA NA 2023-07-12
2 2023-07-12 06:00:00 NA NA 2023-07-12
3 2023-07-12 12:00:00 NA NA 2023-07-12
4 2023-07-12 18:00:00 NA NA 2023-07-12
如果您愿意,可以使用替换 .从:zoo::na.locf()
NA
?zoo::na.locf()
用于将每个 NA 替换为之前的最新非 NA 的通用函数。
数据:
# OP's unprocessed data
data <- structure(list(Datetime = structure(c(1688085261, 1688106892,
1688128522, 1688150134, 1688171767, 1688193399, 1688215049, 1688236681,
1688258314, 1688279926, 1688301559, 1688323191, 1688344840, 1688366455,
1688388103, 1688409734, 1688431365, 1688452997, 1688474627, 1688496259,
1688517891, 1688539524, 1688561156, 1688582787, 1688604419.99,
1688626053, 1688647685, 1688669317, 1688690950, 1688712587, 1688733483,
1688755133, 1688776766, 1688798398, 1688820030, 1688841661, 1688863294,
1688884924, 1688906556, 1688928169, 1688949819, 1688971432, 1688993082,
1689014713, 1689036346, 1689057979, 1689079610, 1689101243, 1689257000,
1689278632, 1689300246, 1689321896, 1689337999, 1689359630, 1689381261,
1689402892, 1689424523, 1689446153, 1689467782, 1689489414, 1689511045,
1689532676, 1689554309, 1689575940, 1689597573, 1689619206, 1689640840,
1689662473, 1689684106, 1689705738, 1689727361, 1689748985, 1689770607,
1689792230, 1689813854, 1689835477, 1689857100, 1689878723, 1689900345,
1689921967, 1689943572, 1689965213, 1689986837.99, 1690008462,
1690030086, 1690051709, 1690073331, 1690094955, 1690116576, 1690138201,
1690159826, 1690181450, 1690203073, 1690224697, 1690246305, 1690267944,
1690288392, 1690310014, 1690331638, 1690353258, 1690374879, 1690396503,
1690418126, 1690439749, 1690461199, 1690482831, 1690504465, 1690526103,
1690547736, 1690569369, 1690591003, 1690612636, 1690634268, 1690655901,
1690677534, 1690699166, 1690720796, 1690742427, 1690764059, 1690785689,
1690807322, 1690828954, 1690850584, 1690872215, 1690893848, 1690915480,
1690937095, 1690958742, 1690980376, 1691002005, 1691023638, 1691045253,
1691066885, 1691088537, 1691110169, 1691131802, 1691153434, 1691175067,
1691196697, 1691218311, 1691239961, 1691261594, 1691283226, 1691304859,
1691326490, 1691348122, 1691369739, 1691391389, 1691413021, 1691434635,
1691456285, 1691477916, 1691499549, 1691521180, 1691542794, 1691564444,
1691586077, 1691607710, 1691629327, 1691650977, 1691672609, 1691694241,
1691715875, 1691737491, 1691759123, 1691780773, 1691802407, 1691824041,
1691845674, 1691867307, 1691888922, 1691910555, 1691932206, 1691953839,
1691975471, 1691997103, 1692018718, 1692040368, 1692062001, 1692083634,
1692105267, 1692126899.99, 1692148531, 1692170164, 1692191798,
1692213431, 1692235063, 1692256695, 1692278328, 1692299962, 1692321596,
1692642800, 1692664436, 1692686067, 1692707696, 1692729328, 1692750958,
1692772590, 1692794223, 1692815854, 1692837485, 1692859117, 1692880749,
1692902382, 1692924015, 1692945647, 1692967279, 1692988911, 1693010525,
1693032174, 1693053804, 1693075435, 1693097048, 1693118703, 1693140342,
1693161975, 1693183614, 1693205253, 1693226890, 1693248522, 1693270156,
1693291789, 1693313426, 1693335058, 1693356690, 1693378323, 1693399957,
1693421589, 1693443226, 1693464864, 1693486501, 1693508133, 1693529769,
1693551412, 1693573050, 1693594686, 1693616322, 1693637940, 1693659594,
1693681231, 1693702868, 1693724505, 1693746144, 1693767781, 1693789420,
1693811058, 1693832701, 1693854333, 1693875986, 1693897645, 1693916439,
1693938090, 1693959742, 1693981383, 1694003035, 1694024676, 1694046329,
1694067987, 1694089639, 1694111272, 1694132927, 1694154565, 1694176210,
1694197864, 1694219510, 1694241147, 1694262802, 1694284443, 1694306095,
1694327742, 1694349380, 1694371023, 1694392679, 1694414325, 1694435968,
1694457612, 1694479259, 1694500913, 1694522564, 1694544211, 1694565856,
1694587510, 1694609156, 1694630795, 1694652450, 1694674087, 1694695732,
1694717388, 1694739025, 1694760680, 1694782328, 1694803975, 1694825622,
1694847277, 1694868923, 1694890568, 1694912211, 1694933848, 1694955504,
1694977140, 1694998795, 1695020437, 1695042084, 1695063731, 1695085369,
1695107017, 1695128671, 1695150317, 1695171963, 1695193610, 1695215248,
1695236903, 1695258550, 1695280198, 1695301845, 1695323492, 1695345138,
1695366785, 1695388421, 1695410078), class = c("POSIXct", "POSIXt"
), tzone = "UTC"), CO2_B = c(2.37945844, 2.78306944, 3.24037287,
2.58560516, 2.47793123, 3.03796434, 2.60713745, 2.49864698, 2.29261307,
3.05987591, 3.1408233, 3.00164821, 2.56353669, 2.48692118, 2.9811499,
2.72509617, 2.48637517, 2.45202609, 3.11129387, 2.85666942, 2.70435732,
3.02732735, 3.31205469, 2.92671771, 2.46088365, 2.73491596, 3.18625977,
2.88077903, 2.53932589, 2.87649197, 5.78558248, 3.39646117, 2.50203712,
2.33915991, 3.5735323, 2.87248647, 2.35225816, 2.53840711, 3.14015425,
2.94740058, 2.44512979, 2.52158394, 4.81956132, 3.27594268, 2.51890644,
2.60967934, 2.86068756, 3.03657847, 3.87108713, 2.96925355, 2.26053988,
2.70190666, 3.01921045, 2.53213186, 2.70804301, 2.64689395, 3.139396,
2.95109581, 2.56879052, 2.60640405, 3.54651982, 3.11179001, 2.35305099,
2.57449849, 3.33883221, 3.15170793, 2.41671403, 2.54164284, 6.94244115,
3.64267315, 2.89990734, 2.71048322, 3.90907737, 3.37550439, 3.02536806,
2.88180359, 3.73526018, 3.13310299, 2.81218778, 5.85877833, 4.39357689,
3.57245726, 2.68519044, 2.56044878, 3.46130493, 3.28864885, 2.55656481,
2.5626052, 3.71863133, 3.41014264, 2.46874297, 2.61884941, 3.53930476,
3.07394231, 2.55274294, 2.23406215, 2.4528281, 2.31213441, 2.16130443,
1.78197081, 5.73435583, 2.50417021, 1.98631971, 1.89492405, 4.30249805,
2.93106408, 2.00939817, 4.62568746, 2.96980568, 2.48328914, 1.7626972,
1.73880611, 3.5952141, 3.0458255, 2.1259389, 2.13861426, 3.22560407,
2.88591732, 2.38192367, 1.95162337, 2.9688135, 2.61705151, 2.47093558,
2.9245237, 4.09443592, 2.84193431, 2.27533311, 2.02805933, 3.71365926,
2.77256854, 2.38381449, 2.05249523, 4.03229169, 3.06758446, 2.34272115,
4.55709201, 3.69335381, 2.9317457, 1.08784785, 1.47326979, 2.20794366,
1.98522693, 1.49545004, 1.43190753, 2.50744537, 2.85324455, 2.32375874,
2.04855838, 3.56315426, 2.54534863, 1.99120387, 1.7770102, 2.9489083,
2.2693575, 1.95150435, 1.50281235, 3.6471243, 2.11240864, 1.60748834,
1.30441338, 3.17593848, 2.40549684, 1.72265148, 1.66162629, 4.61151773,
2.29593825, 1.56656697, 1.37648668, 3.00673555, 2.22630226, 1.69687376,
1.57110213, 2.76168566, 2.21249614, 1.53044735, 2.42823682, 3.08573917,
2.34058818, 1.77633471, 1.57544415, 3.10237654, 2.27145523, 1.70796403,
1.73201743, 2.71681306, 2.03476082, 1.48967509, 1.72776782, 5.80509668,
2.53615895, 1.88053425, 2.50256044, 1.95910795, 1.80056076, 2.43353352,
2.23639009, 1.87980749, 1.7507009, 2.3330964, 2.34117314, 1.72878793,
1.54777574, 5.59039136, 2.5059594, 1.80363684, 1.64019157, 2.75825295,
2.48766937, 1.92457186, 1.93033459, 2.63956678, 2.26933623, 1.72928247,
1.61017065, 2.27838724, 2.00569276, 1.42688126, 1.43023456, 2.22467001,
1.81061373, 1.4532811, 1.33982804, 1.93056838, 1.47982785, 1.39536139,
2.60479996, 2.49143524, 1.61871585, 1.19760616, 1.0453358, 1.7046607,
1.66234619, 1.2162714, 1.24668617, 3.08377973, 1.83578199, 1.15928302,
1.20659348, 2.48603655, 1.94650247, 1.41442428, 1.3437734, 2.48735207,
1.85275679, 1.48198555, 1.27391129, 1.79132538, 1.11742666, 1.09183998,
1.08512705, 3.50043381, 2.4754174, 1.58289519, 1.87787252, 2.14757616,
1.71937741, 1.38524289, 5.50343451, 5.52773172, 1.89779437, 1.36443464,
1.23105911, 1.99452956, 1.46427826, 1.44176246, 1.24269269, 2.20755237,
1.83202904, 1.38095731, 1.29357804, 2.23743046, 1.72952055, 1.23216155,
1.1269867, 3.87726262, 1.9378016, 1.23044142, 1.1512899, 2.67616393,
1.6074028, 0.87359235, 1.04240268, 2.44414241, 1.55885266, 1.28142441,
1.29140425, 1.92672624, 2.17131073, 1.43877928, 1.19278556, 2.6984511,
1.87160787, 1.1441474, 1.2491042, 1.71750655, 1.51176727, 1.67517886,
1.39726141, 2.31140309, 1.52484083, 1.14336398, 1.43938781, 3.81083134,
1.85771523, 1.26312211, 1.17696066, 2.60402764, 1.67144319, 1.28138787,
1.37550466, 1.84351722, 1.82685883, 1.53303749, 1.11018471, 1.9570172,
1.5667831, 1.44953307, 1.34242726, 2.01983618, 2.14082141), CO2_C = c(2.24160596,
2.42278855, 2.48573403, 2.31948849, 2.29890391, 2.36781003, 2.20390185,
1.9725799, 1.94605203, 2.40117675, 2.07161113, 2.10033642, 1.76023781,
2.25551487, 2.20110841, 1.94957149, 1.94953093, 2.23568358, 2.20892352,
2.4043906, 2.03812259, 2.69597583, 3.04789357, 2.48876632, 2.27416772,
2.53722918, 2.56265566, 2.35316972, 1.86765384, 5.16411005, 2.49798275,
1.58135755, 1.6440026, 3.2782156, 2.88467928, 2.11771615, 2.41275541,
4.10138407, 3.55280901, 2.51681839, 2.75972222, 5.41162, 2.86226704,
2.10729162, 1.99668596, 3.09826083, 2.76773652, 4.88547302, 2.16970129,
1.5098549, 2.2984534, 2.9919973, 2.79955535, 1.87958131, 2.13794065,
3.14011375, 2.8989251, 2.00127695, 2.13322636, 3.14530313, 2.8077165,
1.77550832, 2.24076887, 3.1759559, 2.68074628, 1.89528342, 2.22671344,
5.08126786, 2.60730828, 1.99200237, 1.91916867, 3.22275673, 3.01617353,
2.4482067, 2.39956749, 3.33484642, 2.95019096, 2.55578599, 8.87898359,
4.16620877, 2.77214376, 2.12165786, 2.03176967, 3.38806748, 2.95551955,
2.26026151, 2.3617654, 3.40297496, 2.91829566, 2.11770998, 2.28682218,
3.4712133, 2.78356588, 2.28344597, 2.16046768, 2.73694626, 2.39073146,
1.91409872, 1.79769719, 5.23179741, 2.18150543, 1.85368752, 1.65493764,
4.24034466, 2.40462344, 1.78261557, 5.33654082, 2.61354374, 2.23634097,
0.8139261, 1.51317935, 3.0011946, NaN, 1.23291007, NaN, 3.26310198,
2.75888912, 2.19620874, 1.94480558, 3.18520053, 2.68568215, 2.18516884,
4.7810355, NaN, 0.47125431, 0.94651273, 0.52927391, 7.98622666,
1.89955988, 1.45945858, 1.2546542, 2.70332173, 2.39278843, 1.85935117,
7.55656867, 2.87248322, 2.18188878, 0.28476099, 0.53640426, 1.21017633,
0.96489476, 1.05827157, 1.12748403, 1.95247716, 1.92841194, 1.60829854,
1.54026566, 2.32163282, 2.1068724, 1.71025564, 1.5586972, 2.62275187,
1.97402004, 1.45509033, 1.34369927, 2.67570588, 1.50089775, 0.97211471,
1.01649398, 2.40021633, 1.92578309, 1.47622737, 1.47971085, 3.49181633,
1.59261866, 1.22453331, 1.12530048, 2.53737101, 2.12048972, 1.59154236,
1.33522252, 2.55057209, 2.01753299, 1.45118778, 2.70940153, 2.43776118,
1.79693503, 1.46530427, 1.27045459, 2.46921191, 2.11044421, 1.60460228,
1.37759708, 2.37151657, 1.98174184, 1.68062101, 1.57477944, 4.1590178,
1.76690159, NaN, 1.37147218, 0.6730865, NaN, 2.35021349, 1.85453206,
1.78164746, 2.51736569, 2.14282659, 1.76114656, 1.85840523, 9.04934784,
1.95124436, 1.42082718, 1.39776209, 2.27148326, 2.1318257, 1.87414528,
1.61305648, 2.4786769, 2.16123401, 1.67928333, 1.6790784, 2.34602876,
2.00834093, 1.57030435, 1.41844828, 1.78303105, 1.57049364, 1.33119839,
1.42795602, 1.72016492, 1.3495883, 1.39291847, 9.89920987, 2.57792347,
1.37453228, 1.0044393, 0.83451231, 1.55311221, 1.25856817, 0.92478042,
0.87460879, 3.12687228, 1.21880996, 0.77445948, 0.76482777, 1.73887796,
1.24076553, 0.97756203, 0.9909099, 1.99516104, 1.57255717, 1.32054006,
1.16349561, 1.96896625, NaN, 1.89072157, 1.68240736, 3.64180529,
2.20466293, 1.25700563, 2.33761353, 2.39122385, NaN, 0.38585941,
NaN, 3.97340966, 2.33116223, 1.66629612, 1.45008254, 2.74217919,
1.59611667, 1.19680148, 1.18842868, 2.2216571, 1.41526544, 1.32188882,
1.20107015, 2.16701728, 1.63383266, 1.26748549, 1.34390836, 3.86943754,
1.49579507, 1.17096663, 1.16436239, 2.49238173, 1.57718906, 1.08147786,
1.32665322, 2.31067166, 1.59086154, 1.5673111, 1.56408657, 3.20510624,
2.22657466, 1.65296984, 1.37424595, 2.46565151, 1.56177872, 1.33041124,
1.26945934, 1.82245528, 1.60163064, 1.4912671, 1.28480613, 2.05911073,
1.41854127, 1.32698115, 1.44689801, 3.46598139, 1.67798472, 1.34523501,
1.2761992, 1.86752296, 1.5371493, 1.31560451, 1.44410222, 1.47471455,
1.53124803, 1.4677739, 1.7102374, 2.15021362, 1.66733529, 1.7423732,
1.50556735, 1.61367568, 1.62600443, 1.66443, 2.02318432)), row.names = c(38L,
47L, 56L, 65L, 74L, 83L, 92L, 101L, 110L, 119L, 128L, 137L, 146L,
155L, 164L, 173L, 182L, 191L, 200L, 209L, 218L, 227L, 236L, 245L,
254L, 263L, 272L, 281L, 290L, 299L, 306L, 315L, 324L, 333L, 342L,
351L, 360L, 369L, 378L, 387L, 396L, 405L, 414L, 423L, 432L, 441L,
450L, 459L, 469L, 478L, 487L, 496L, 505L, 514L, 523L, 532L, 541L,
550L, 559L, 568L, 577L, 586L, 595L, 604L, 613L, 622L, 631L, 640L,
649L, 658L, 667L, 676L, 685L, 694L, 703L, 712L, 721L, 730L, 739L,
748L, 757L, 766L, 775L, 784L, 793L, 802L, 811L, 820L, 829L, 838L,
847L, 856L, 865L, 874L, 883L, 892L, 901L, 910L, 919L, 928L, 937L,
946L, 955L, 964L, 973L, 982L, 991L, 1000L, 1009L, 1018L, 1027L,
1036L, 1045L, 1054L, 1063L, 1072L, 1081L, 1090L, 1099L, 1108L,
1117L, 1126L, 1135L, 1144L, 1153L, 1162L, 1171L, 1180L, 1189L,
1198L, 1207L, 1216L, 1225L, 1234L, 1243L, 1252L, 1261L, 1270L,
1279L, 1288L, 1297L, 1306L, 1315L, 1324L, 1333L, 1342L, 1351L,
1360L, 1369L, 1378L, 1387L, 1396L, 1405L, 1414L, 1423L, 1432L,
1441L, 1450L, 1459L, 1468L, 1477L, 1486L, 1495L, 1504L, 1513L,
1522L, 1531L, 1540L, 1549L, 1558L, 1567L, 1576L, 1585L, 1594L,
1603L, 1612L, 1621L, 1630L, 1639L, 1648L, 1657L, 1666L, 1675L,
1684L, 1693L, 1702L, 1711L, 1720L, 1729L, 1738L, 1747L, 1755L,
1764L, 1773L, 1782L, 1791L, 1800L, 1809L, 1818L, 1827L, 1836L,
1845L, 1854L, 1863L, 1872L, 1881L, 1890L, 1899L, 1908L, 1917L,
1926L, 1935L, 1944L, 1953L, 1962L, 1971L, 1980L, 1989L, 1998L,
2007L, 2016L, 2025L, 2034L, 2043L, 2052L, 2061L, 2070L, 2079L,
2088L, 2097L, 2106L, 2115L, 2124L, 2133L, 2142L, 2151L, 2160L,
2169L, 2178L, 2187L, 2196L, 2205L, 2214L, 2223L, 2232L, 2241L,
2250L, 2259L, 2268L, 2277L, 2286L, 2295L, 2304L, 2313L, 2322L,
2331L, 2340L, 2349L, 2358L, 2367L, 2376L, 2385L, 2394L, 2403L,
2412L, 2421L, 2430L, 2439L, 2448L, 2457L, 2466L, 2475L, 2484L,
2493L, 2502L, 2511L, 2520L, 2529L, 2538L, 2547L, 2556L, 2565L,
2574L, 2583L, 2592L, 2601L, 2610L, 2619L, 2628L, 2637L, 2646L,
2655L, 2664L, 2673L, 2682L, 2691L, 2700L, 2709L, 2718L, 2727L,
2736L, 2745L, 2754L, 2763L, 2772L, 2781L, 2790L, 2799L, 2808L,
2817L, 2826L, 2835L, 2844L, 2853L, 2862L, 2871L, 2880L, 2889L,
2898L, 2907L), class = "data.frame")
评论
dput(your_data)
dput(your_data)