基本上,我有一个简单的两列数据帧,一个以 10° 为间隔的圆度数,另一个在不同的数据帧中具有这些度数的频率。
In the degrees column there is a row for 0° and a row for 360°, and since those mean the same thing (in the context of wind direction) I'd like to combine the two rows into a single 0° row. E.g. from:
degree freq
0 1446
10 7652
20 2655
...
360 5417
Run Code Online (Sandbox Code Playgroud)
To this
degree freq
0 6863
10 7652
20 2655
...
Run Code Online (Sandbox Code Playgroud)
I'm sure this a very simple thing to do but I've spent 3 …
在 R 中,我有一个如下所示的数据框:
2021 2020 2019 2018 2017 2015 2010 2006 2002 1998 1994 1990
1 6 6 6 6 4 6 6 6 6 6 6 6
2 6 6 6 6 6 6 6 6 6 3 4 4
3 7 6 6 6 4 6 6 6 6 6 6 6
4 6 6 6 6 6 6 6 6 6 6 6 6
5 4 4 7 6 4 6 6 6 6 6 4 6 …Run Code Online (Sandbox Code Playgroud)