Closed cstepper closed 4 years ago
Hi, just added an Alias for Encoding<-.
Encoding<-
Makes it more concise for me working across multiple columns.
set_encoding <- `Encoding<-` tab = tab %>% mutate(across(c(col_a, col_b), set_encoding, "UTF-8"))
compared to
tab = tab %>% mutate(across(c(col_a, col_b), function(x) { Encoding(x) <- "UTF-8" return(x) }) )
Thanks, Christoph
You can just do
tab <- tab %>% mutate(across(c(col_a, col_b), `Encoding<-`, "UTF-8"))
Thanks and yes, this is an elegant solution. Hope I can remember next time I need this ;)
Hi, just added an Alias for
Encoding<-
.Makes it more concise for me working across multiple columns.
compared to
Thanks, Christoph