dplyr equivalent to DF[DF==X] <- Y

Viewed 305

I'm wondering if there's a dplyr equivalent to

df <- data.frame(A=1:5,B=2:6,C=-1:3)
df[df==2] <- 10

I'm looking for

df %>% <??>

That is, a statement that is chainable with other dplyr verbs

2 Answers
Related