View source: R/peek-guess-encoding.R
| peek_guess_encoding | R Documentation |
Detect the encoding of a text file. This function is a
wrapper around guess_encoding from
the readr package, returning the best candidate
as a character string.
readr must be installed (it is listed in Suggests).
If it is not available, the function stops with an informative
message.
peek_guess_encoding(path)
path |
path to the text file. |
a character string giving the most likely encoding.
## Not run:
f <- system.file(package = "fpeek",
"datafiles", "cigfou-ISO-8859-1.txt")
peek_guess_encoding(f)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.