Learn R Programming

fritools (version 4.6.0)

escape_non_ascii: Escape non-ASCII Characters

Description

I often get code with german umlauts that need to be escaped.

Usage

escape_non_ascii(x)

Value

A character vector.

Arguments

x

A character vector.

See Also

Other vector functions: char2factor(), file_string(), powers_of_ten

Examples

Run this code
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