dimanche 3 octobre 2021

Change value in columns based off of another column in dataframe R

    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

I would like to change all ✗ to ✓ in Autoswing if Duration(seconds) is inf. I was trying to use an if statement

Aucun commentaire:

Enregistrer un commentaire