【发布时间】:2021-11-24 09:56:39
【问题描述】:
df ex:
# A tibble: 20 x 2
Autoswing `Duration(seconds)`
<chr> <dbl>
1 ✗ 4
2 ✗ 5
3 ✗ 7
4 ✗ 6
5 ✗ 8
6 ✗ 9
7 ✗ 11
8 ✗ 16
9 ✗ 16
10 ✗ 8
11 ✗ 12
12 ✗ 15
13 ✗ 10
14 ✗ Inf
15 ✗ 14
16 ✗ Inf
17 ✗ Inf
18 ✗ Inf
19 ✗ Inf
20 ✗ Inf
如果 Duration(seconds) 为 inf,我想在 Autoswing 中将所有 ✗ 更改为 ✓。我试图使用 if 语句
【问题讨论】:
-
与
dput分享您的数据
标签: r dataframe if-statement