Last chance! 50% off unlimited learning
Sale ends in
rw_fac(x, fac, from, to)rw_rule(x, fac, from, to)
arrange
,
at_least
, chop
,
combine
, dissolve
,
filter
, mutate
,
rename
, rm_uncomplete
,
sample_frac
, sample_n
,
select
, slice
,
subset.Coo
, transmute
data(bot)
# single renaming
rw_fac(bot, "type", "whisky", "agua_de_fuego") # 1 instead of "type" is fine too
# several renaming
bot2 <- mutate(bot, fake=factor(rep(letters[1:4], 10)))
rw_fac(bot2, "fake", c("a", "e"), "ae")$fake
Run the code above in your browser using DataLab