Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read utf-8 encoded text in R [closed]

Tags:

r

xlsx

I'm importing .xlsx files in to R and when I enter print data command I get a mess with specific symbols. The file opens nicely with excel. This is the code I use:

library("xlsx") data <-read.xlsx("file.xlsx", sheetIndex = 1) print(data)

like image 214
Donatas Kiznis Avatar asked Oct 21 '16 11:10

Donatas Kiznis


1 Answers

I don't have access to your data so I cannot check:

data <- xlsx::read.xlsx("file.xlsx", sheetIndex = 1, encoding="UTF-8")
like image 192
Christoph Avatar answered Oct 25 '22 22:10

Christoph