powered by
Recode text to other categories. Values of x which correspond to from[i] will be recoded to to[i]
x
from[i]
to[i]
txt_recode(x, from = c(), to = c())
a character vector
a character vector with values of x which you want to recode
a character vector with values of you want to use to recode to where you want to replace values of x which correspond to from[i] to to[i]
a character vector of the same length of x where values of x which are given in from will be replaced by the corresponding element in to
from
to
match
# NOT RUN { x <- c("NOUN", "VERB", "NOUN", "ADV") txt_recode(x = x, from = c("VERB", "ADV"), to = c("conjugated verb", "adverb")) # }
Run the code above in your browser using DataLab