powered by
Permutes tokens in the tidy text dataset with a string scalar only if they are matched to an expression.
mute_tokens(tbl, condition, .as = NA_character_)
A data.frame.
A tidy text dataset.
A logical expression.
String with which tokens are replaced when they are matched to condition. The default value is NA_character.
NA_character
df <- prettify(head(hiroba), col_select = "POS1") mute_tokens(df, POS1 %in% c("\u52a9\u8a5e", "\u52a9\u52d5\u8a5e"))
Run the code above in your browser using DataLab