首页 > 解决方案 > 总结独特价值

问题描述

我有一个梦幻足球统计数据集,我用它来自学 R。这些数据是年度球员梦幻足球数据。下面是它的格式示例。

| x | Year| Player    | TM | *Pos*| Age |*FantasyPts*|
| 1 | 2019| *J.Jones*   | ATL| WR | 29  |100       |
| 2 | 2018| *J.Jones*   | ATL| WR | 28  |101.3     |
| 3 | 2019| *A.Rogers*  | GB | QB | 30  |500       |
| 4 | 2017| *A.Peterson*| TM | RB | 29  |12        |

What I want to do is summarize the player data as a whole. So for example summarize the two years together of *J.Jones* to be as follows.

| Player   | *Pos*| *FantasyPts*|
| *J.Jones*  | WR |      201.3|

Any thoughts?

标签: rsumuniquesummarize

解决方案


推荐阅读