Is there an alternative to “revalue” function from plyr when using dplyr?

后端 未结 4 1605
再見小時候
再見小時候 2021-02-18 15:57

I\'m a fan of the revalue function is plyr for substituting strings. It\'s simple and easy to remember.

However, I\'ve migrated new code to

4条回答
  •  甜味超标
    2021-02-18 16:46

    We can do this with chartr from base R

    chartr("ac", "AC", x)
    

    data

    x <- c("a", "b", "c")
    

提交回复
热议问题