powered by
I often get code with german umlauts that need to be escaped.
escape_non_ascii(x)
A character vector.
Other vector functions: char2factor(), file_string(), powers_of_ten
char2factor()
file_string()
powers_of_ten
x <- c("foo", "djörman", "bar", "djörman bar") escape_non_ascii(x) # change file f <- tempfile() writeLines(x, f) writeLines(escape_non_ascii(readLines(f)), f)
Run the code above in your browser using DataLab