加载或查看 pdata.frame 时出现问题(无法将 class“"pseries"”强制转换为 data.frame)

Issue when loading or viewing a pdata.frame (cannot coerce class ""pseries"" to a data.frame)

我对特定数据集有如下问题:

1) 我加载 table: Regression_990_DT<-fread("DATASET FINALE PER REGRESSIONE 990.R")

2)我用它来分配一个pdata.frame:

mypanel<- pdata.frame(Regression_990_DT, index = c("Individual","Year"), drop.index = FALSE)

当我尝试从环境中查看 "mypanel" 时,我得到

View(mypanel)
Error in View : cannot coerce class ""pseries"" to a data.frame

奇怪的是,如果我使用 head 函数,我可以看到 "mypanel":

 head(mypanel)


       Individual Year   Durata Project_number Expenditure SUD_DUMMY_1ifSUD PIL_ProCapite_euro      Emp
1-2007          1 2007 315.2321            280   454408824                1           16017.20 33.00737
1-2008          1 2008 315.2321            387  1051968083                1           14895.19 32.96581
1-2009          1 2009 315.2321            330  1121238394                1           14816.81 32.90641
1-2010          1 2010 315.2321            430  1184709708                1           14722.75 31.42855
1-2011          1 2011 315.2321            615  1484840551                1           14828.00 33.02960
1-2012          1 2012 315.2321            243  2672475087                1           14982.53 32.38563
       Tonns.inhabitant Diploma_percentage Degree_percentage Reati.Associativi.per.100000.abitanti PA.payment.delays
1-2007         3.196138       0.0001685805      6.130319e-05                              3.196138             -4.93
1-2008         2.727606       0.0001714428      6.379166e-05                              2.727606             -4.93
1-2009         2.803359       0.0001787922      6.747277e-05                              2.803359             -4.93
1-2010         2.219315       0.0001835938      6.743277e-05                              2.219315             -4.93
1-2011         2.418667       0.0001899075      6.597913e-05                              2.418667             -4.93
1-2012         3.000064       0.0001914966      7.117328e-05                              3.000064             -4.93
       Percentage.mistrust
1-2007            0.066392
1-2008            0.118608
1-2009            0.099814
1-2010            0.090391
1-2011            0.100016
1-2012            0.093328

但是如果我在 plm 函数中使用 "mypanel",我会再次遇到类似的错误。

linear_model <- Durata ~ SUD_DUMMY_1ifSUD + PIL_ProCapite_euro + Emp + `Tonns/inhabitant` + Diploma_percentage + Degree_percentage + Reati.Associativi.per.100000.abitanti + PA.payment.delays + `Percentage mistrust` + Project_number + Expenditure + SUD_DUMMY_1ifSUD*(PIL_ProCapite_euro + Emp + `Tonns/inhabitant` + Diploma_percentage + Degree_percentage + Reati.Associativi.per.100000.abitanti + PA.payment.delays + `Percentage mistrust` + Project_number + Expenditure)

fixed__time_effects_fit   <- plm(linear_model, pdata.frame(Regression_990_DT, index = c("Individual","Year"), drop.index = FALSE), model = "within", effect = "time", index = c("Individual","Year") )

Error in as.data.frame.default(x, ...) : 
  cannot coerce class ""pseries"" to a data.frame

如果我处理包 "foregin" 中的犯罪数据,则一切正常。我注意到两个数据集之间的唯一区别(除了我准备了第一个数据集之外)如下:

class(Regression_990_DT)
[1] "data.table" "data.frame"

同时

data(Crime)
class(Crime)
[1] "data.frame"

将 "Regression_990_DT" 转换为 data.frame 无法解决我的问题。问题的原因是什么,我该如何解决?如果我需要提供任何其他信息,请告诉我。

-edit:根据要求,这是

获得的 Regression_990_DT 的较短版本
smallRegression_DT<-Regression_990_DT[c(1:150),]
 mypanel<-pdata.frame(smallRegression_DT,index=c("Individual","Year"),drop.index = FALSE)
dput(smallRegression_DT,file="Small Regression 990 _DT.txt")

View(mypanel)
Error in View : cannot coerce class ""pseries"" to a data.frame

structure(list(Individual = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 
3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 
5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 
7L, 7L, 7L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 
9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 9L, 10L, 10L, 10L, 10L, 10L, 
10L, 10L, 10L, 10L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 
12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 12L, 13L, 13L, 13L, 13L, 
13L, 13L, 13L, 13L, 13L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 14L, 
14L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 15L, 16L, 16L, 16L, 
16L, 16L, 16L, 16L, 16L, 16L, 17L, 17L, 17L, 17L, 17L, 17L), 
    Year = c(2007L, 2008L, 2009L, 2010L, 2011L, 2012L, 2013L, 
    2014L, 2015L, 2007L, 2008L, 2009L, 2010L, 2011L, 2012L, 2013L, 
    2014L, 2015L, 2007L, 2008L, 2009L, 2010L, 2011L, 2012L, 2013L, 
    2014L, 2015L, 2007L, 2008L, 2009L, 2010L, 2011L, 2012L, 2013L, 
    2014L, 2015L, 2007L, 2008L, 2009L, 2010L, 2011L, 2012L, 2013L, 
    2014L, 2015L, 2007L, 2008L, 2009L, 2010L, 2011L, 2012L, 2013L, 
    2014L, 2015L, 2007L, 2008L, 2009L, 2010L, 2011L, 2012L, 2013L, 
    2014L, 2015L, 2007L, 2008L, 2009L, 2010L, 2011L, 2012L, 2013L, 
    2014L, 2015L, 2007L, 2008L, 2009L, 2010L, 2011L, 2012L, 2013L, 
    2014L, 2015L, 2007L, 2008L, 2009L, 2010L, 2011L, 2012L, 2013L, 
    2014L, 2015L, 2007L, 2008L, 2009L, 2010L, 2011L, 2012L, 2013L, 
    2014L, 2015L, 2007L, 2008L, 2009L, 2010L, 2011L, 2012L, 2013L, 
    2014L, 2015L, 2007L, 2008L, 2009L, 2010L, 2011L, 2012L, 2013L, 
    2014L, 2015L, 2007L, 2008L, 2009L, 2010L, 2011L, 2012L, 2013L, 
    2014L, 2015L, 2007L, 2008L, 2009L, 2010L, 2011L, 2012L, 2013L, 
    2014L, 2015L, 2007L, 2008L, 2009L, 2010L, 2011L, 2012L, 2013L, 
    2014L, 2015L, 2007L, 2008L, 2009L, 2010L, 2011L, 2012L), 
    Durata = c(315.23214, 315.23214, 315.23214, 315.23214, 315.23214, 
    315.23214, 315.23214, 315.23214, 315.23214, 222.51546, 222.51546, 
    222.51546, 222.51546, 222.51546, 222.51546, 222.51546, 222.51546, 
    222.51546, 397.27027, 397.27027, 397.27027, 397.27027, 397.27027, 
    397.27027, 397.27027, 397.27027, 397.27027, 703.625, 703.625, 
    703.625, 703.625, 703.625, 703.625, 703.625, 703.625, 703.625, 
    909.4, 909.4, 909.4, 909.4, 909.4, 909.4, 909.4, 909.4, 909.4, 
    1065.21429, 1065.21429, 1065.21429, 1065.21429, 1065.21429, 
    1065.21429, 1065.21429, 1065.21429, 1065.21429, 212.71698, 
    212.71698, 212.71698, 212.71698, 212.71698, 212.71698, 212.71698, 
    212.71698, 212.71698, 733.48607, 733.48607, 733.48607, 733.48607, 
    733.48607, 733.48607, 733.48607, 733.48607, 733.48607, 781.09052, 
    781.09052, 781.09052, 781.09052, 781.09052, 781.09052, 781.09052, 
    781.09052, 781.09052, 454.65979, 454.65979, 454.65979, 454.65979, 
    454.65979, 454.65979, 454.65979, 454.65979, 454.65979, 286.8, 
    286.8, 286.8, 286.8, 286.8, 286.8, 286.8, 286.8, 286.8, 755.79573, 
    755.79573, 755.79573, 755.79573, 755.79573, 755.79573, 755.79573, 
    755.79573, 755.79573, 722, 722, 722, 722, 722, 722, 722, 
    722, 722, 219.65, 219.65, 219.65, 219.65, 219.65, 219.65, 
    219.65, 219.65, 219.65, 10.685, 10.685, 10.685, 10.685, 10.685, 
    10.685, 10.685, 10.685, 10.685, 94.71429, 94.71429, 94.71429, 
    94.71429, 94.71429, 94.71429, 94.71429, 94.71429, 94.71429, 
    833, 833, 833, 833, 833, 833), Project_number = c(280L, 387L, 
    330L, 430L, 615L, 243L, 286L, 170L, 107L, 97L, 211L, 301L, 
    462L, 460L, 256L, 282L, 130L, 61L, 37L, 197L, 927L, 1315L, 
    818L, 1501L, 1309L, 359L, 265L, 72L, 368L, 527L, 537L, 824L, 
    784L, 403L, 270L, 186L, 10L, 855L, 1855L, 1591L, 809L, 1382L, 
    1607L, 987L, 333L, 196L, 176L, 161L, 206L, 799L, 1187L, 1151L, 
    627L, 204L, 53L, 132L, 155L, 328L, 276L, 200L, 247L, 131L, 
    53L, 323L, 304L, 345L, 412L, 538L, 293L, 281L, 125L, 184L, 
    1392L, 2906L, 2590L, 4282L, 3054L, 2000L, 2592L, 1415L, 1034L, 
    97L, 327L, 456L, 573L, 433L, 375L, 336L, 294L, 256L, 5L, 
    30L, 62L, 36L, 78L, 68L, 152L, 131L, 21L, 328L, 268L, 254L, 
    461L, 434L, 249L, 232L, 124L, 166L, 1L, 322L, 5727L, 11597L, 
    4850L, 5090L, 5332L, 9028L, 2852L, 40L, 114L, 209L, 435L, 
    510L, 246L, 279L, 151L, 65L, 200L, 561L, 721L, 565L, 624L, 
    728L, 1139L, 674L, 38L, 7L, 53L, 38L, 11L, 20L, 24L, 19L, 
    9L, 6L, 2L, 316L, 11657L, 18206L, 5603L, 5313L), Expenditure = structure(c(2.24507789105521e-315, 
    5.19741290331773e-315, 5.53965371273612e-315, 5.85324367017415e-315, 
    7.33608705801087e-315, 1.3203781298533e-314, 1.37603666534843e-314, 
    1.37787426643203e-314, 1.42931215672168e-314, 1.10493599920768e-315, 
    2.78111181472538e-315, 4.08555403157724e-315, 6.03474379381271e-315, 
    2.92335982594828e-315, 2.10677764220621e-315, 4.97719366528225e-315, 
    2.50730802008156e-315, 1.3557450646726e-315, 1.22211348914397e-315, 
    7.06165915964323e-315, 5.68514907911076e-315, 8.63895336849416e-315, 
    6.518459204092e-315, 5.45292522669823e-315, 5.75673959138633e-315, 
    2.02059139321463e-315, 2.28337467319741e-315, 1.44833103490658e-315, 
    8.44587400617765e-316, 7.69697774873404e-316, 1.69872296074671e-315, 
    2.82685130551031e-315, 2.26327005512371e-315, 3.38988178139624e-315, 
    8.80346508442572e-316, 3.52926001725594e-316, 3.31635112273602e-316, 
    4.11788068749675e-315, 4.66759747761107e-315, 4.94952538635505e-315, 
    6.21304848365825e-315, 5.43250025151911e-315, 4.61502688204638e-315, 
    4.60218188670904e-315, 9.11710008088802e-316, 6.75823345663609e-316, 
    7.55169211322606e-316, 1.3094319340289e-315, 8.9587601440725e-316, 
    2.05032386852884e-315, 1.69227172327942e-315, 1.61179458068917e-315, 
    6.12852332289325e-316, 8.00617450409318e-316, 3.98847283964917e-316, 
    1.5362782277324e-315, 1.45770418154403e-315, 3.18971756218428e-315, 
    1.64988099462003e-315, 1.65651634070958e-315, 1.52342794095199e-315, 
    2.15769003982836e-315, 1.10135439382457e-315, 4.66185302575344e-315, 
    5.42470473553934e-315, 1.85033886817145e-314, 1.36530109464952e-314, 
    1.38553981350301e-314, 2.20084318045441e-314, 2.17992424585356e-314, 
    1.27220638650222e-314, 2.79378396564311e-314, 7.70169376737712e-314, 
    7.92339879074891e-314, 9.89082438702125e-314, 1.05443863471203e-313, 
    7.90178504668966e-314, 1.33184796574724e-313, 9.56658369934295e-314, 
    8.92010279381010e-314, 6.96683626223774e-314, 1.52966857305643e-315, 
    2.93886463357133e-315, 8.2136993577628e-315, 7.97677442626418e-315, 
    7.80177861756524e-315, 1.29159551204738e-314, 9.42702692693334e-315, 
    8.0874444293594e-315, 5.94018790973892e-315, 3.38803184645786e-316, 
    8.80794280137398e-316, 1.99365539862508e-315, 7.62690402293186e-316, 
    1.89449228817528e-315, 9.8682051576145e-316, 1.93639274067234e-315, 
    2.46283733434106e-315, 9.50765862807958e-316, 5.96722848814439e-315, 
    1.06994343472647e-314, 9.5190759367421e-315, 1.51047108519991e-314, 
    2.14623570983886e-314, 2.00784570507211e-314, 6.81080660652017e-315, 
    2.49703193092735e-314, 4.1064732003652e-314, 1.37266406603767e-317, 
    4.14518082822992e-316, 2.84248202082254e-315, 2.26690243069259e-315, 
    1.99453278016159e-315, 2.98418738986531e-315, 1.73871133472845e-315, 
    4.83667151429208e-315, 7.92463183482783e-316, 4.98083466723731e-316, 
    2.14945858502597e-315, 2.10332726065863e-315, 2.53771661435079e-315, 
    1.83255560123057e-315, 1.47439491469941e-315, 2.6777400159528e-315, 
    1.5434689134892e-315, 5.29005696579034e-316, 4.61221636985739e-315, 
    1.40514394999439e-314, 1.57537762890352e-314, 2.87895147350592e-314, 
    1.51187841587605e-314, 1.25667992052346e-314, 1.38458490170316e-314, 
    7.99323815107727e-315, 1.39403967786661e-315, 3.74050677613012e-318, 
    2.94698868344296e-315, 2.42657095943635e-315, 1.4649547480571e-315, 
    2.42139556250829e-315, 1.75558019337113e-315, 1.25461132892846e-315, 
    4.30768114362938e-316, 1.14890047516878e-315, 7.31890863759714e-317, 
    2.45346008695874e-316, 4.58341881002415e-315, 3.15069214190891e-315, 
    2.98218576689234e-315, 2.3086077322002e-315), class = "integer64"), 
    SUD_DUMMY_1ifSUD = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 
    1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
    1L, 1L, 1L, 1L, 1L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
    0L, 0L, 0L, 0L, 0L, 0L), PIL_ProCapite_euro = c(16017.2, 
    14895.189, 14816.806, 14722.745, 14828.003, 14982.532, 14836.961, 
    14626.445, 14686.912, 28668.328, 27738.481, 27244.28, 27867.301, 
    27628.399, 26525.23, 26483.071, 26752.422, 27455.077, 28639.774, 
    29917.11, 28633.44, 28650.331, 28994.473, 28388.53, 28004.273, 
    28943.801, 29252.051, 34323.172, 35436.74, 33873.006, 35436.74, 
    36005.37, 36273.89, 34773.338, 34828.621, 34781.235, 27891.22, 
    26699.835, 25627.88, 26233.768, 26915.391, 26737.703, 27215.422, 
    27655.273, 27512.54, 27547.554, 25468.404, 25168.663, 24564.425, 
    24640.55, 24041.069, 23831.727, 25078.266, 24650.065, 25035.992, 
    24079.261, 21972.614, 23200.725, 24626.622, 24125.258, 24410.438, 
    24612.823, 24691.017, 18166.98, 18225.274, 17707.617, 17695.958, 
    17588.695, 16513.74, 16723.601, 16320.201, 17411.479, 20105.202, 
    20278.454, 19629.562, 20004.941, 20300.912, 20538.331, 20092.369, 
    20038.629, 20749.281, 15011.359, 15230.875, 14572.326, 14671.874, 
    14822.472, 14840.34, 14587.641, 14705.057, 15029.226, 28518.978, 
    29773.031, 27045.585, 28113.675, 29939.92, 29572.764, 29982.834, 
    30955.56, 31217.814, 17040.343, 16298.847, 15697.92, 15901.743, 
    15929.857, 15989.598, 16639.724, 15462.468, 15842.002, 31731.822, 
    31070.302, 30613.954, 30482.386, 31015.098, 30266.172, 30052.719, 
    30452.024, 31093.303, 26623.705, 27558.449, 25078.628, 25760.442, 
    26376.273, 25018.145, 24671.74, 24737.722, 25348.055, 35825.923, 
    35926.328, 34708.156, 37015.408, 38777.607, 38007.157, 38431.315, 
    39203.814, 40075.693, 35553.231, 36736.093, 36551.828, 37806.019, 
    39078.041, 40603.676, 41178.265, 41709.266, 42802.967, 31712.134, 
    31969.792, 29375.442, 29976.375, 31277.588, 30730.772), Emp = c(33.00737, 
    32.96581, 32.90641, 31.42855, 33.0296, 32.38563, 31.19866, 
    29.59565, 28.67413, 45.13487, 45.28553, 45.76248, 46.47342, 
    46.27013, 46.56509, 44.3959, 44.27633, 45.88783, 49.85083, 
    49.25714, 49.4815, 48.63342, 48.2398, 48.54748, 47.63039, 
    47.71985, 48.96371, 52.93986, 52.64704, 51.68178, 52.12498, 
    51.71524, 50.95752, 50.07143, 50.28642, 50.11013, 49.9222, 
    50.16975, 48.98439, 49.14021, 48.10511, 47.3435, 48.03157, 
    47.10132, 46.77532, 48.27925, 47.79025, 45.32459, 44.66372, 
    41.25143, 40.81287, 41.9599, 44.30028, 43.73822, 48.24239, 
    49.42848, 49.42862, 48.49263, 48.02634, 46.19165, 46.30036, 
    47.08245, 46.90809, 39.78552, 40.20164, 38.95049, 38.47775, 
    35.66514, 37.24592, 38.92615, 37.03323, 36.46754, 40.07384, 
    40.17697, 38.14993, 38.91914, 38.37085, 38.30482, 35.78833, 
    35.40592, 36.17464, NA, NA, NA, 34.05118, 34.18934, 32.63739, 
    30.57588, 33.50477, 32.37374, 51.33769, 50.7384, 48.20746, 
    49.1953, 50.63153, 50.7262, 49.86904, 50.14707, 50.26067, 
    37.30394, 37.92444, 36.14444, 35.23136, 34.73377, 33.56797, 
    29.8873, 29.24559, 31.60482, 52.58534, 52.46016, 51.35902, 
    50.93016, 50.43861, 49.02563, 49.25593, 48.09922, 49.02446, 
    49.2332, 49.30345, 48.82432, 47.4721, 45.95467, 45.73236, 
    45.81414, 46.85135, 46.10432, 53.11023, 53.40045, 51.79805, 
    51.5413, 52.01815, 50.92445, 51.02461, 51.49187, 51.15569, 
    57.15862, 57.77888, 57.57656, 57.73713, 57.31809, 57.87199, 
    57.36274, 56.98581, 56.88521, 51.68247, 51.99544, 51.61008, 
    50.59364, 48.84598, 48.88933), `Tonns/inhabitant` = c(3.1961383, 
    2.7276062, 2.8033593, 2.2193151, 2.4186671, 3.0000642, 2.8925586, 
    4.4959187, 2.5377862, 1.4157181, 1.2660572, 1.3993453, 0.7104918, 
    1.3758356, 1.0536304, 0.8625729, 1.0833668, 1.1779746, 2.8737565, 
    2.5857834, 1.7990829, 1.1031003, 1.5571079, 2.2684239, 2.3238603, 
    2.1907682, 1.6803746, 2.3980432, 2.3817179, NA, 1.5782392, 
    NA, 1.5719316, 1.5598495, NA, NA, 1.6673366, 1.8190397, 1.6715239, 
    1.4741435, 1.8536874, 1.7118151, 1.6390494, 1.0928721, 1.3071805, 
    2.8737565, 2.5857834, 1.7990829, 1.1031003, 1.5571079, 2.2684239, 
    2.3238603, 2.1907682, 1.6803746, 1.4157181, 1.2660572, 1.3993453, 
    0.7104918, 1.3758356, 1.0536304, 0.8625729, 1.0833668, 1.1779746, 
    4.1259857, 4.8171136, 4.4487863, 3.2626923, 3.486474, 3.5893337, 
    2.7663908, 3.0175185, 3.3127343, 2.2049477, 1.9048913, 1.7301393, 
    2.0736453, 1.5795176, 2.1479161, 1.8670767, 5.1097927, 2.0814786, 
    2.2049477, 1.9048913, 1.7301393, 2.0736453, 1.5795176, 2.1479161, 
    1.8670767, 5.1097927, 2.0814786, 1.32461, 1.3734346, 1.3237428, 
    1.4029454, 1.0303314, 0.5957631, 1.2234194, 0.9741827, 1.3004537, 
    4.1259857, 4.8171136, 4.4487863, 3.2626923, 3.486474, 3.5893337, 
    2.7663908, 3.0175185, 3.3127343, 1.0708336, 1.0202281, 1.2012661, 
    1.4845711, 1.3426456, 1.2105416, 1.0825619, 0.9811768, 1.0993973, 
    1.4157181, 1.2660572, 1.3993453, 0.7104918, 1.3758356, 1.0536304, 
    0.8625729, 1.0833668, 1.1779746, 1.0524552, 1.0870344, 1.099711, 
    0.6714496, 1.1069367, 1.0093217, 1.3372861, 0.6968749, 0.7192099, 
    1.5101398, 1.5931621, 0.7895187, 0.5878284, 0.7790111, 0.9664081, 
    1.1472906, 3.3208643, 5.0117066, 1.0708336, 1.0202281, 1.2012661, 
    1.4845711, 1.3426456, 1.2105416), Diploma_percentage = c(0.0001685805, 
    0.0001714428, 0.0001787922, 0.0001835938, 0.0001899075, 0.0001914966, 
    0.0001888013, 0.0001949259, 0.0001983538, 0.0002224064, 0.0002237536, 
    0.0002294661, 0.0002376372, 0.0002408855, 0.0002346469, 0.000237483, 
    0.0002419359, 0.0002416174, 0.0002211421, 0.0002281085, 0.0002308735, 
    0.0002258536, 0.0002319775, 0.0002342337, 0.0002335658, 0.0002378574, 
    0.0002441675, 0.0002049992, 0.0002040436, 0.0002178408, 0.0002215369, 
    0.0002225399, 0.0002194361, 0.0002170905, 0.0002249092, 0.0002254857, 
    0.0001956611, 0.0002031769, 0.000218449, 0.0002193913, 0.0002172489, 
    0.0002177178, 0.0002255263, 0.0002329892, 0.0002345239, 0.0002211421, 
    0.0002281085, 0.0002308735, 0.0002258536, 0.0002319775, 0.0002342337, 
    0.0002335658, 0.0002378574, 0.0002441675, 0.0002224064, 0.0002237536, 
    0.0002294661, 0.0002376372, 0.0002408855, 0.0002346469, 0.000237483, 
    0.0002419359, 0.0002416174, 0.0001721867, 0.0001705109, 0.0001773556, 
    0.0001811312, 0.0001909625, 0.0001967905, 0.000200789, 0.0002038329, 
    0.0001999294, 0.0001762201, 0.000173649, 0.0001738305, 0.0001797104, 
    0.0001903682, 0.0001861347, 0.0001853483, 0.0001881858, 0.0001891495, 
    0.0001762201, 0.000173649, 0.0001738305, 0.0001797104, 0.0001903682, 
    0.0001861347, 0.0001853483, 0.0001881858, 0.0001891495, 0.000223488, 
    0.0002306453, 0.0002370594, 0.0002449644, 0.0002433402, 0.0002491851, 
    0.0002492638, 0.0002544098, 0.000252495, 0.0001721867, 0.0001705109, 
    0.0001773556, 0.0001811312, 0.0001909625, 0.0001967905, 0.000200789, 
    0.0002038329, 0.0001999294, 0.0002265142, 0.0002280823, 0.0002302713, 
    0.0002340262, 0.0002393325, 0.0002434788, 0.0002473161, 0.0002480673, 
    0.0002453857, 0.0002224064, 0.0002237536, 0.0002294661, 0.0002376372, 
    0.0002408855, 0.0002346469, 0.000237483, 0.0002419359, 0.0002416174, 
    0.0002241009, 0.0002277676, 0.0002348658, 0.000242902, 0.0002423722, 
    0.0002454686, 0.0002528271, 0.000254094, 0.0002495213, 0.0002246225, 
    0.0002309484, 0.0002373578, 0.0002397655, 0.000246238, 0.0002491149, 
    0.0002549095, 0.0002667609, 0.0002648261, 0.0002265142, 0.0002280823, 
    0.0002302713, 0.0002340262, 0.0002393325, 0.0002434788), 
    Degree_percentage = c(6.130319e-05, 6.379166e-05, 6.747277e-05, 
    6.743277e-05, 6.597913e-05, 7.117328e-05, 7.367855e-05, 7.302673e-05, 
    7.229071e-05, 7.158837e-05, 7.662479e-05, 7.662272e-05, 7.859236e-05, 
    7.819857e-05, 8.407029e-05, 8.802172e-05, 8.891417e-05, 9.012124e-05, 
    7.531376e-05, 7.581808e-05, 8.432531e-05, 8.783673e-05, 8.449147e-05, 
    9.177848e-05, 9.965288e-05, 0.0001009108, 0.0001000585, 6.421576e-05, 
    6.667193e-05, 6.081188e-05, 6.17438e-05, 6.833044e-05, 8.125888e-05, 
    8.989891e-05, 8.448902e-05, 8.521561e-05, 8.03137e-05, 8.551822e-05, 
    8.277732e-05, 8.529328e-05, 9.045635e-05, 9.40858e-05, 9.396692e-05, 
    9.570612e-05, 0.000105987, 7.531376e-05, 7.581808e-05, 8.432531e-05, 
    8.783673e-05, 8.449147e-05, 9.177848e-05, 9.965288e-05, 0.0001009108, 
    0.0001000585, 7.158837e-05, 7.662479e-05, 7.662272e-05, 7.859236e-05, 
    7.819857e-05, 8.407029e-05, 8.802172e-05, 8.891417e-05, 9.012124e-05, 
    6.088015e-05, 6.442274e-05, 6.859315e-05, 7.105602e-05, 6.887158e-05, 
    7.621768e-05, 7.955348e-05, 7.986245e-05, 8.298539e-05, 6.081867e-05, 
    6.540378e-05, 6.140755e-05, 6.400306e-05, 6.44149e-05, 6.851434e-05, 
    7.261599e-05, 7.663e-05, 7.278414e-05, 6.081867e-05, 6.540378e-05, 
    6.140755e-05, 6.400306e-05, 6.44149e-05, 6.851434e-05, 7.261599e-05, 
    7.663e-05, 7.278414e-05, 6.837772e-05, 7.285187e-05, 7.411649e-05, 
    7.841716e-05, 7.929979e-05, 7.743996e-05, 8.357224e-05, 8.623972e-05, 
    8.860659e-05, 6.088015e-05, 6.442274e-05, 6.859315e-05, 7.105602e-05, 
    6.887158e-05, 7.621768e-05, 7.955348e-05, 7.986245e-05, 8.298539e-05, 
    7.87614e-05, 8.481446e-05, 8.671614e-05, 8.923952e-05, 8.981926e-05, 
    9.295857e-05, 9.718942e-05, 0.0001013284, 0.0001091616, 7.158837e-05, 
    7.662479e-05, 7.662272e-05, 7.859236e-05, 7.819857e-05, 8.407029e-05, 
    8.802172e-05, 8.891417e-05, 9.012124e-05, 7.986197e-05, 8.699749e-05, 
    9.059117e-05, 8.982733e-05, 9.694028e-05, 9.999793e-05, 9.965632e-05, 
    0.0001045577, 0.0001130813, 6.609168e-05, 6.881413e-05, 7.229612e-05, 
    7.773812e-05, 8.005653e-05, 8.300723e-05, 8.606477e-05, 9.501401e-05, 
    9.612805e-05, 7.87614e-05, 8.481446e-05, 8.671614e-05, 8.923952e-05, 
    8.981926e-05, 9.295857e-05), Reati.Associativi.per.100000.abitanti = c(3.1961383, 
    2.7276062, 2.8033593, 2.2193151, 2.4186671, 3.0000642, 2.8925586, 
    4.4959187, 2.5377862, 1.4157181, 1.2660572, 1.3993453, 0.7104918, 
    1.3758356, 1.0536304, 0.8625729, 1.0833668, 1.1779746, 2.8737565, 
    2.5857834, 1.7990829, 1.1031003, 1.5571079, 2.2684239, 2.3238603, 
    2.1907682, 1.6803746, 2.3980432, 2.3817179, NA, 1.5782392, 
    NA, 1.5719316, 1.5598495, NA, NA, 1.6673366, 1.8190397, 1.6715239, 
    1.4741435, 1.8536874, 1.7118151, 1.6390494, 1.0928721, 1.3071805, 
    2.8737565, 2.5857834, 1.7990829, 1.1031003, 1.5571079, 2.2684239, 
    2.3238603, 2.1907682, 1.6803746, 1.4157181, 1.2660572, 1.3993453, 
    0.7104918, 1.3758356, 1.0536304, 0.8625729, 1.0833668, 1.1779746, 
    4.1259857, 4.8171136, 4.4487863, 3.2626923, 3.486474, 3.5893337, 
    2.7663908, 3.0175185, 3.3127343, 2.2049477, 1.9048913, 1.7301393, 
    2.0736453, 1.5795176, 2.1479161, 1.8670767, 5.1097927, 2.0814786, 
    2.2049477, 1.9048913, 1.7301393, 2.0736453, 1.5795176, 2.1479161, 
    1.8670767, 5.1097927, 2.0814786, 1.32461, 1.3734346, 1.3237428, 
    1.4029454, 1.0303314, 0.5957631, 1.2234194, 0.9741827, 1.3004537, 
    4.1259857, 4.8171136, 4.4487863, 3.2626923, 3.486474, 3.5893337, 
    2.7663908, 3.0175185, 3.3127343, 1.0708336, 1.0202281, 1.2012661, 
    1.4845711, 1.3426456, 1.2105416, 1.0825619, 0.9811768, 1.0993973, 
    1.4157181, 1.2660572, 1.3993453, 0.7104918, 1.3758356, 1.0536304, 
    0.8625729, 1.0833668, 1.1779746, 1.0524552, 1.0870344, 1.099711, 
    0.6714496, 1.1069367, 1.0093217, 1.3372861, 0.6968749, 0.7192099, 
    1.5101398, 1.5931621, 0.7895187, 0.5878284, 0.7790111, 0.9664081, 
    1.1472906, 3.3208643, 5.0117066, 1.0708336, 1.0202281, 1.2012661, 
    1.4845711, 1.3426456, 1.2105416), PA.payment.delays = c(-4.93, 
    -4.93, -4.93, -4.93, -4.93, -4.93, -4.93, -4.93, -4.93, 53.48, 
    53.48, 53.48, 53.48, 53.48, 53.48, 53.48, 53.48, 53.48, 18.34, 
    18.34, 18.34, 18.34, 18.34, 18.34, 18.34, 18.34, 18.34, 39.39, 
    39.39, 39.39, 39.39, 39.39, 39.39, 39.39, 39.39, 39.39, -12.31, 
    -12.31, -12.31, -12.31, -12.31, -12.31, -12.31, -12.31, -12.31, 
    172, 172, 172, 172, 172, 172, 172, 172, 172, 21.59, 21.59, 
    21.59, 21.59, 21.59, 21.59, 21.59, 21.59, 21.59, 10, 10, 
    10, 10, 10, 10, 10, 10, 10, 43.28, 43.28, 43.28, 43.28, 43.28, 
    43.28, 43.28, 43.28, 43.28, 43, 43, 43, 43, 43, 43, 43, 43, 
    43, -14.28, -14.28, -14.28, -14.28, -14.28, -14.28, -14.28, 
    -14.28, -14.28, 39.79, 39.79, 39.79, 39.79, 39.79, 39.79, 
    39.79, 39.79, 39.79, -12.21, -12.21, -12.21, -12.21, -12.21, 
    -12.21, -12.21, -12.21, -12.21, -5.14, -5.14, -5.14, -5.14, 
    -5.14, -5.14, -5.14, -5.14, -5.14, 4.81, 4.81, 4.81, 4.81, 
    4.81, 4.81, 4.81, 4.81, 4.81, -6.79, -6.79, -6.79, -6.79, 
    -6.79, -6.79, -6.79, -6.79, -6.79, -1, -1, -1, -1, -1, -1
    ), `Percentage mistrust` = c(0.066392, 0.118608, 0.099814, 
    0.090391, 0.100016, 0.093328, 0.102955, 0.116963, 0.122902, 
    0.041415, 0.065325, 0.045325, 0.04775, 0.047288, 0.05539, 
    0.048018, 0.067868, 0.052026, 0.04836, 0.055536, 0.04646, 
    0.049234, 0.045954, 0.052704, 0.053452, 0.064068, 0.066778, 
    0.041496, 0.060602, 0.036616, 0.050505, 0.039996, 0.076824, 
    0.0424, 0.048068, 0.061934, 0.03069, 0.049518, 0.04074, 0.057855, 
    0.041447, 0.045368, 0.041664, 0.04816, 0.055755, 0.04836, 
    0.055536, 0.04646, 0.049234, 0.045954, 0.052704, 0.053452, 
    0.064068, 0.066778, 0.041415, 0.065325, 0.045325, 0.04775, 
    0.047288, 0.05539, 0.048018, 0.067868, 0.052026, 0.09423, 
    0.115431, 0.079182, 0.085852, 0.085224, 0.084152, 0.106984, 
    0.10304, 0.120408, 0.066528, 0.099268, 0.09515, 0.087904, 
    0.079156, 0.095011, 0.093009, 0.10336, 0.087327, 0.066528, 
    0.099268, 0.09515, 0.087904, 0.079156, 0.095011, 0.093009, 
    0.10336, 0.087327, 0.035096, 0.04176, 0.048841, 0.039935, 
    0.041241, 0.051086, 0.039798, 0.059856, 0.051129, 0.09423, 
    0.115431, 0.079182, 0.085852, 0.085224, 0.084152, 0.106984, 
    0.10304, 0.120408, 0.042921, 0.052559, 0.049245, 0.041108, 
    0.043434, 0.03798, 0.04895, 0.050778, 0.04888, 0.041415, 
    0.065325, 0.045325, 0.04775, 0.047288, 0.05539, 0.048018, 
    0.067868, 0.052026, 0.03444, 0.03937, 0.043326, 0.035475, 
    0.034344, 0.05133, 0.029575, 0.036494, 0.046816, 0.033485, 
    0.038304, 0.02325, 0.042488, 0.027666, 0.031842, 0.034048, 
    0.046208, 0.041905, 0.042921, 0.052559, 0.049245, 0.041108, 
    0.043434, 0.03798)), .Names = c("Individual", "Year", "Durata", 
"Project_number", "Expenditure", "SUD_DUMMY_1ifSUD", "PIL_ProCapite_euro", 
"Emp", "Tonns/inhabitant", "Diploma_percentage", "Degree_percentage", 
"Reati.Associativi.per.100000.abitanti", "PA.payment.delays", 
"Percentage mistrust"), class = c("data.table", "data.frame"), row.names = c(NA, 
-150L), .internal.selfref = <pointer: 0x00000000001d0788>)

据我所知:这是由于一列 Expenditure 包含 class integer64,其中 pdata.frame 打嗝。

尝试将此列转换为 numeric