I am having some trouble importing the following file: http://www.kuleuven.be/bio/ento/temp/test.xlsx into R in the correct encoding. In particular,
library(
Try this:
library(stringi)
?stringi
Apply this to see your file codification
stri_enc_detect("path-to-your-file/your-file.csv", filter_angle_brackets = T)
stri_enc_detect2("path-to-your-file/your-file.csv", locale = NULL)
The first one works for me.
Then apply the result in the read.csv()
, as the example bellow:
df <- read.csv("path-to-your-file/your-file.csv",header = TRUE, sep = ";",
quote = "\"", na.strings = "", dec = ".", skip = 2, check.names = T,
fileEncoding = "YOUR RESULT OF stri_enc_detect", encoding = "UTF-8")
Try this:
Sys.setlocale(category = "LC_ALL", locale = "Greek")