I have the following file read into a data.table like so:
raw <- fread("avito_train.tsv", nrows=1000)
Then, if I change the encoding of a particular column and row like this:
Encoding(raw$title[2]) <- "UTF-8"
It works perfectly.
But, how can I apply the encoding to all columns, and all rows?
I checked the fread documentation but there doesn't appear to be any encoding option. Also, I tried Encoding(raw) but that gives me an error (a character vector argument expected).
Edit: This article details more information on foreign text in RStudio on Windows http://quantifyingmemory.blogspot.com/2013/01/r-and-foreign-characters.html