I have a column like this:

| weekday |
| --- |
| 1 |
| 5 |
| 3 |
| 6 |
| ... |

I want to update these values in this way:

* 1 -> 7
* 2 -> 1
* 3 -> 2
* 4 -> 3
* 5 -> 4
* 6 -> 7
* 7 -> 6

I've tried:

```
df$weekday[df$weekday == 1] <- 7
df$weekday[df$weekday == 2] <- 1
df$weekday[df$weekday == 3] <- 2
df$TIC_DATE_WEEKDAY[df$weekday == 4] <- 3
df$TIC_DATE_WEEKDAY[df$weekday == 5] <- 4
df$TIC_DATE_WEEKDAY[df$weekday == 6] <- 5
df$TIC_DATE_WEEKDAY[df$weekday == 7] <- 6 

```

But in this way when I update a value than the others change obviously.