如果列ID相同,则删除行

时间:2017-06-09 13:48:13

标签: r rows tabular

我对 R 相对较新。我有下面的表1。如何获取下面的输出表。有什么建议?

Table 1:

YEAR  COUNTY  Ref  Pred   N     Accuracy  Overall  AccOne  AccTwo
2010     1     0    0    5472     81.0      0        0       0
2010     1     0    0    472      81.0      0        0       0
2010     1     0    0    1472     81.0      0        0       0
2010     1     0    0    54       81.0      0        0       0
2010     1     0    0    5        81.0      21.4     0       0
2010     1     0    0    572      81.0      0        0       0
2010     1     0    0    472      81.0      0        12.3    0
2010     1     0    0    54       81.0      0        0       74.4
2010     101   0    0    5472     91.0      0        0       0
2010     101   0    0    472      91.0      0        0       0
2010     101   0    0    1472     91.0      0        0       0
2010     101   0    0    54       91.0      0        0       0
2010     101   0    0    5        91.0      100     0        0
2010     101   0    0    572      91.0      0        0       0
2010     101   0    0    472      91.0      0        NaN     0
2010     101   0    0    54       91.0      0        0       NaN


Output:
    2010     1       0    0    5472     81.0      21.4     12.3    74.4
    2010     101     0    0    472      91.0      100       NaN     NaN

0 个答案:

没有答案