创建基于增长率的估算值的新列

我有一个数据集,其中包含某些地区FDI(外国投资)的缺失值。

我想通过以下方式估算这些值: 1)计算每年外国投资的增长率-特别是在Region =='National'的情况下, 2)使用增长率估算该年的净资产值(FDI_t = FDI_ {t-1} * Growth_ {t})。

到目前为止,我只能使用以下代码来计算每年和每个地区的增长率:

# Calculate growth rate of FDI
df_FDI$Growth <- with(df_FDI, ave(FDI, Region, FUN=function(x) c(NA, diff(x)/x[-length(x)])))

这是我的数据:

structure(list(Region = structure(c(1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L, 1L, 2L, 7L, 9L, 8L, 10L, 14L, 19L, 11L, 12L, 4L, 6L, 13L, 17L, 5L, 3L, 15L, 18L, 16L), .Label = c("Andalusia", "Aragon", "Asturias", "Balearic Islands", "Basque Country", "Canary Islands", "Cantabria", "Castile-La Mancha", "Castile and Leon", "Catalonia", "Extremadura", "Galicia", "La Rioja", "Madrid", "Murcia", "National", "Navarre", "Unassigned", "Valencian Community"), class = "factor"), Year = c(1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018), FDI = c(33200.01, 1667.21, 57.4, 359.39, 223.27, 219253.49, 181260.2, 19353.91, 6.01, 1465.95, 46890.57, 35841.39, NA, 270.73, 2191.71, 1206.11, 6.01, 22457.35, 565710.71, 47954.49, 1078.76, 166.79, 54.97, 350.25, 71585.75, 191721.59, 4603.35, 134.34, 3729.14, 29648.11, 5076.9, NA, 6.02, 1839.03, 2283.82, 33.18, 98637.33, 458903.82, 45018.21, 6718.55, 1138.5, 254.1, 577.71, 136504.86, 385454.29, 35254.62, 360, 6554.49, 45380.92, 22488.14, NA, 443.27, 7591.11, 50.73, 882.94, 5818.8, 700491.24, 39698.73, 1083.21, 695.43, 946.21, 168, 140042.59, 354180.07, 12122.09, NA, 2055.31, 42491.13, 6779.89, NA, 9.03, 11775.49, NA, 4542.7, 0, 616589.88, 39294.16, 2699.04, NA, NA, 222.86, 566243.72, 196932.23, 33898.5, 18.02, 8.22, 44065.12, 17654.75, 60.8, 185.12, 16435.11, 180.8, 20.64, 0, 917919.09, 36528.21, 259.02, NA, 226, NA, 130633.76, 373548.13, 12629.37, 905.03, 590.82, 35220.27, 2922.23, 190.38, 130.9, 3649.07, 0.5, 39.38, 4044.01, 601517.08, 24700.56, 315.45, NA, 1688.82, 1.5, 151723.26, 240659.49, 18443.48, 3.75, 10.93, 34147.65, 13403.08, NA, 758.62, 406.48, 524, 18, 0, 486805.07, 39988.98, 1075.75, 463.39, 284.5, 0.75, 171765.73, 250477.09, 9761.01, 1.51, 1096.31, 50307.65, 3531.07, NA, NA, 3171.94, 0.36, 355.83, 0, 532281.87, 104562.15, 885.03, 317.92, 1800, 95715.8, 108367.87, 396595.33, 8016.14, 160, 99.7, 29497.82, 4064.83, NA, 332.52, 66423.29, 3.01, 8423.43, 4542.9, 829807.74, 70938.25, 2566.9, 0.2, 8898.2, 3634.04, 203421.24, 480590.05, 4973.58, 337.49, 13.76, 30051.14, 5953.48, 0, 9.22, 11350.54, 0, 195.08, 1491.3, 824424.47, 30116.92, 0, 666, 601.83, 16109.44, 122669.66, 623961.11, 2953.11, 0, 320.4, 68831.4, 641.87, 0, 90, 59584.13, 1780.7, 1173.26, 1454.74, 930954.57, 32333.42, 0, 0, 2495.49, 836.05, 172964.85, 352782.43, 9712.27, 0, 308.15, 82353.71, 18375.41, 0, 526.67, 10218.66, 1031.2, 5.51, 872, 684815.82, 21057.01, 7, 0, 0, 2998.36, 977082.07, 281283.99, 2665.42, 0, 3578.99, 66809.11, 2391.3, 0, 0, 15391.05, 2000, 75.03, 3681.22, 1379020.55, 119403.24, 33.4, 142, 2252.53, 409.01, 145676.03, 932575.3, 8579.26, 265.77, 2042.39, 165112.18, 4132.66, 3, 30, 140, 123, 3, 29404, 1410326.77, 81578.92, 0, 0, 365.03, 16407.3, 162259.08, 1186491.79, 5184.48, 3.02, 5999.27, 81426.21, 10042.66, 767.79, 0, 1572.26, 0, 2828.16, 1943.92, 1556869.89, 74676, 3843.15, 0, 2.85, 0, 227924.42, 1164239.51, 19150.45, 0, 4079.36, 80246.02, 13895.6, 0, 0, 75350.31, 6, 8252.7, 210227.5, 1881893.87, 36769.61, 2642.37, 0, 1716, 757.68, 153788.56, 2421712.78, 22424.42, 155, 13863.58, 114214.89, 1934.67, 1499, 3383.24, 75021.14, 3.01, 29852.28, 107598.02, 2987336.25, 30184.34, 2695.4, 2967, 5433.2, 435, 415852.07, 2853239.56, 9528.78, 2083.02, 3177.77, 143590.9, 11623.18, 1194, 27304.4, 537545.95, 3248.7, 7156.91, 38616.91, 4095877.09, 115189.85, 14083.43, 3, 2025.09, 4.5, 406685.08, 2095476.02, 32024.64, 0, 5938.1, 90446.43, 12672.36, 0, 1.51, 4509.88, 393.62, 8740.16, 13169.63, 2801363.3, 72909.91, 2568.35, 93, 5862.44, 4626.26, 643144.19, 2346999.92, 26620.04, 0.22, 462.43, 51271.23, 651.06, 4.8, 46.1, 10347.72, 3, 3662.44, 1660.88, 3170933.99, 85129.34, 153517.62, 7.22, 3077.31, NA, 448227.86, 2969853.07, 27815.61, 454.05, 3341.56, 62364.26, 25698.23, 3, NA, 9.77, 3487.58, 14203.5, 22859.32, 3820049.3), Growth = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 0.444411914333761, -0.352954936690639, 1.90574912891986, -0.847046384150922, 0.568728445380033, -0.673502346530493, 0.0577147658449013, -0.762148837108367, 21.3527454242928, 1.54383846652341, -0.367717005786025, -0.858350917751795, NA, -0.977763823735825, -0.160915449580465, 0.893542048403546, 4.52079866888519, 3.39220700572418, -0.188801251438213, -0.0612305542192191, 5.22803033112092, 5.82594879788956, 3.62252137529562, 0.649421841541756, 0.906871968233901, 1.01048974192213, 6.65847046172896, 1.67976775346137, 0.757641171959218, 0.530651363611373, 3.42950225531328, NA, 72.6328903654485, 3.12777931844505, -0.977787216155389, 25.6106088004822, -0.941008135560847, 0.526444560866806, -0.118162850099993, -0.838773247203638, -0.389169960474308, 2.72377016922471, -0.709196655761541, 0.0259165131556489, -0.0811360018849446, -0.656155987498943, NA, -0.686427166720828, -0.0636785239259143, -0.6985126382173, NA, -0.979628668757191, 0.551221099417608, NA, 4.14497021315152, -1, -0.11977503101966, -0.010191006110271, 1.49170520951616, NA, NA, 0.326547619047619, 3.0433679497073, -0.443977098993741, 1.79642371901215, NA, -0.996000603315315, 0.0370427898716745, 1.60398767531627, NA, 19.500553709856, 0.395704977032803, NA, -0.995456446606644, NaN, 0.488702814908347, -0.0703908672433767, -0.904032544904855, NA, NA, NA, -0.769297644484251, 0.896835931832996, -0.627435727244568, 49.223640399556, 70.8759124087591, -0.200722249252924, -0.834479106189552, 2.13125, -0.292891097666379, -0.777971063169033, -0.997234513274336, 0.907945736434109, Inf, -0.344694879371122, -0.323794951901558, 0.217859624739402, NA, 6.47265486725664, NA, 0.161439891188924, -0.355747035863893, 0.460364214525348, -0.995856490945052, -0.981500287735689, -0.030454621727772, 3.58659311553163, NA, 4.79541634835752, -0.888607234171994, 1047, -0.542915185373286, -1, -0.190704493378642, 0.618950339587443, 2.41020763987954, NA, -0.831539181203444, -0.5, 0.132098862099325, 0.0407945682923204, -0.470760940993782, -0.597333333333333, 99.3028362305581, 0.473239007662313, -0.736547868101959, NA, NA, 6.80343436331431, -0.999312977099237, 18.7683333333333, NaN, 0.0934189120092771, 1.61477412027013, -0.177290262607483, -0.313925634994281, 5.32688927943761, 127620.066666667, -0.369094929471671, 0.583359699683512, -0.178759165291297, 104.960264900662, -0.909058569200317, -0.413651402917847, 0.151160979533116, NA, NA, 19.9409036740922, 7.36111111111111, 22.6726245679116, Inf, 0.558962998307645, -0.32156855994258, 1.9003536603279, -0.999370910920986, 3.94344444444444, -0.962033018582094, 0.877136092090764, 0.211789483249841, -0.379554249302033, 1.1093125, -0.861985957873621, 0.0187579963536288, 0.46463197722906, NA, -0.97227234452063, -0.829118069881814, -1, -0.976840788135, -0.671729511985736, -0.00648737019493216, -0.575448788206645, -1, 3329, -0.932364972691106, 3.43292864140186, -0.396967298006835, 0.298322988584554, -0.406240575199353, -1, 22.2848837209302, 1.29047550275963, -0.892185746823706, NaN, 8.76138828633406, 4.24945332997373, Inf, 5.01425056387123, -0.0245155233688728, 0.129217537659939, 0.0735965032280857, NaN, -1, 3.14650316534569, -0.948101858289301, 0.410005130853057, -0.434608304354097, 2.28882771044763, NaN, -0.0382334581772784, 0.196455542092708, 27.6279308894324, NaN, 4.85188888888889, -0.828500307044846, -0.42090189251418, -0.995303683752962, -0.400580172401941, -0.264393943519714, -0.348754013649036, Inf, NaN, -1, 2.58634052987262, 4.64902100050964, -0.202670070615478, -0.725561583440329, NaN, 10.6144410189843, -0.188754094988556, -0.869864128201765, NaN, -1, 0.506171063524963, 0.939487975174554, 12.6170598911071, 3.22158256880734, 1.01371012427838, 4.67047458304859, 3.77142857142857, Inf, Inf, -0.863588761856482, -0.850907068635493, 2.31542260901518, 2.21872725499171, Inf, -0.42933900346187, 1.47140217853523, 0.728206414920754, Inf, Inf, -0.990903804483775, -0.9385, -0.960015993602559, 6.98756933842585, 0.0227017791721813, -0.316778003678962, -1, -1, -0.837946664417344, 39.1146671230532, 0.113835131284124, 0.272274517671656, -0.395696132300455, -0.988636791210445, 1.93737728837294, -0.506843105093761, 1.43007167296608, 254.93, -1, 10.2304285714286, -1, 941.72, -0.933889266766426, 0.103907210099968, -0.0846164670971373, Inf, NaN, -0.992192422540613, -1, 0.404694393682006, -0.01875468518834, 2.69380342869487, -1, -0.320023936245577, -0.0144939817289789, 0.383657317881916, -1, NaN, 46.9248406752064, Inf, 1.91804565512559, 107.146168566608, 0.208767593289379, -0.507611414644598, -0.312446820967175, NaN, 601.105263157895, Inf, -0.325265103230273, 1.08008125407117, 0.170960473513677, Inf, 2.39846936774396, 0.42330909370957, -0.860771035435677, Inf, Inf, -0.00436852880897236, -0.498333333333333, 2.61727434657748, -0.488182944667087, 0.58740952272723, -0.179095454099187, 0.0200691046295561, Inf, 2.16620046620047, -0.425878999049731, 1.70405074343631, 0.178190734906226, -0.575071283894968, 12.4388387096774, -0.770782871379543, 0.257199477231033, 5.00783596168856, -0.203468979319546, 7.07048864402171, 6.16525968546999, 1078.3023255814, -0.760255833055298, -0.641100180096251, 0.371080034930785, 2.81621231406749, 4.2249870149143, -0.998988877654196, -0.627274902451594, -0.989655172413793, -0.0220438724760947, -0.265580062264383, 2.36083318116275, -1, 0.868637440721009, -0.370110292504609, 0.0902661750054632, -1, -0.999944697557903, -0.99161024280808, -0.878837688921723, 0.221219772220134, -0.658967276252813, -0.316052889663249, -0.367045707586215, -0.817633204411141, 30, 1.89490343639048, 1027.05777777778, 0.581430501458278, 0.120031867508558, -0.168763801872558, Inf, -0.922124922113134, -0.433131523267419, -0.948623618647198, Inf, 29.5298013245033, 1.29445572831206, -0.992378436055078, -0.580964192875188, -0.873885598912042, 0.131925298657265, 0.167596284236258, 58.7728580606226, -0.922365591397849, -0.475080341973649, NA, -0.303067854814952, 0.265382689062895, 0.0449124043389867, 2062.86363636364, 6.22608827281967, 0.216359740150568, 38.4713697662274, -0.375, NA, -0.999055830656415, 1161.52666666667, 2.87815227007132, 12.7633784499783, 0.204707922664767)), row.names = c(NA, -399L ), groups = structure(list(Year = c(1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1998, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 1999, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2001, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2002, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2003, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2006, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018), Region = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L), .Label = c("Andalusia", "Aragon", "Asturias", "Balearic Islands", "Basque Country", "Canary Islands", "Cantabria", "Castile-La Mancha", "Castile and Leon", "Catalonia", "Extremadura", "Galicia", "La Rioja", "Madrid", "Murcia", "National", "Navarre", "Unassigned", "Valencian Community"), class = "factor"), .rows = list(1L, 2L, 16L, 11L, 15L, 12L, 3L, 5L, 4L, 6L, 9L, 10L, 13L, 7L, 17L, 19L, 14L, 18L, 8L, 20L, 21L, 35L, 30L, 34L, 31L, 22L, 24L, 23L, 25L, 28L, 29L, 32L, 26L, 36L, 38L, 33L, 37L, 27L, 39L, 40L, 54L, 49L, 53L, 50L, 41L, 43L, 42L, 44L, 47L, 48L, 51L, 45L, 55L, 57L, 52L, 56L, 46L, 58L, 59L, 73L, 68L, 72L, 69L, 60L, 62L, 61L, 63L, 66L, 67L, 70L, 64L, 74L, 76L, 71L, 75L, 65L, 77L, 78L, 92L, 87L, 91L, 88L, 79L, 81L, 80L, 82L, 85L, 86L, 89L, 83L, 93L, 95L, 90L, 94L, 84L, 96L, 97L, 111L, 106L, 110L, 107L, 98L, 100L, 99L, 101L, 104L, 105L, 108L, 102L, 112L, 114L, 109L, 113L, 103L, 115L, 116L, 130L, 125L, 129L, 126L, 117L, 119L, 118L, 120L, 123L, 124L, 127L, 121L, 131L, 133L, 128L, 132L, 122L, 134L, 135L, 149L, 144L, 148L, 145L, 136L, 138L, 137L, 139L, 142L, 143L, 146L, 140L, 150L, 152L, 147L, 151L, 141L, 153L, 154L, 168L, 163L, 167L, 164L, 155L, 157L, 156L, 158L, 161L, 162L, 165L, 159L, 169L, 171L, 166L, 170L, 160L, 172L, 173L, 187L, 182L, 186L, 183L, 174L, 176L, 175L, 177L, 180L, 181L, 184L, 178L, 188L, 190L, 185L, 189L, 179L, 191L, 192L, 206L, 201L, 205L, 202L, 193L, 195L, 194L, 196L, 199L, 200L, 203L, 197L, 207L, 209L, 204L, 208L, 198L, 210L, 211L, 225L, 220L, 224L, 221L, 212L, 214L, 213L, 215L, 218L, 219L, 222L, 216L, 226L, 228L, 223L, 227L, 217L, 229L, 230L, 244L, 239L, 243L, 240L, 231L, 233L, 232L, 234L, 237L, 238L, 241L, 235L, 245L, 247L, 242L, 246L, 236L, 248L, 249L, 263L, 258L, 262L, 259L, 250L, 252L, 251L, 253L, 256L, 257L, 260L, 254L, 264L, 266L, 261L, 265L, 255L, 267L, 268L, 282L, 277L, 281L, 278L, 269L, 271L, 270L, 272L, 275L, 276L, 279L, 273L, 283L, 285L, 280L, 284L, 274L, 286L, 287L, 301L, 296L, 300L, 297L, 288L, 290L, 289L, 291L, 294L, 295L, 298L, 292L, 302L, 304L, 299L, 303L, 293L, 305L, 306L, 320L, 315L, 319L, 316L, 307L, 309L, 308L, 310L, 313L, 314L, 317L, 311L, 321L, 323L, 318L, 322L, 312L, 324L, 325L, 339L, 334L, 338L, 335L, 326L, 328L, 327L, 329L, 332L, 333L, 336L, 330L, 340L, 342L, 337L, 341L, 331L, 343L, 344L, 358L, 353L, 357L, 354L, 345L, 347L, 346L, 348L, 351L, 352L, 355L, 349L, 359L, 361L, 356L, 360L, 350L, 362L, 363L, 377L, 372L, 376L, 373L, 364L, 366L, 365L, 367L, 370L, 371L, 374L, 368L, 378L, 380L, 375L, 379L, 369L, 381L, 382L, 396L, 391L, 395L, 392L, 383L, 385L, 384L, 386L, 389L, 390L, 393L, 387L, 397L, 399L, 394L, 398L, 388L)), row.names = c(NA, -399L), class = c("tbl_df", "tbl", "data.frame"), .drop = TRUE), class = c("grouped_df", "tbl_df", "tbl", "data.frame"))

评论