utf8_encoding | R Documentation |
fread
from data.table could not recognize the encoding
and return the correct form, this could be unconvenient for text mining tasks. The
utf8-encoding
could use "UTF-8" as the encoding to override the current
encoding of characters in a data frame.
utf8_encoding(.data, .cols)
.data |
A data.frame. |
.cols |
The columns you want to convert, usually a character column. |
A data.table with characters in UTF-8 encoding
iris %>%
as.data.table() %>%
utf8_encoding(Species) # could also use `is.factor`
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.