总结独特价值

时间:2021-01-28 03:39:16

标签: r sum unique summarize

我有一个 Fantasy Football 统计数据集,我用来自学 R。数据是年度球员 Fantasy Football 以下是其格式的示例。

| 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?

0 个答案:

没有答案
相关问题