0

I recently reinstalled both R and RStudion ( 3.5.1 version for R and 1.1.463 for RStudio) and now I cannot read any file with cyrillic symbols in its name. As example, a have a folder contains .xls files ("тест1.xls", "тест2.xls") and when I run

data <- read_excel("тест1.xls", sheet = "food")

I receive a message "Error in loadWorkbook(file, password = password) : Cannot find тест1.xls ". The path is correct and this script worked perfectly before reinstallation. Can you please advise how to fix it or which package I can use for cyrillic symbols? (now I'm using "readxl")

sessioninfo() `

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=Russian_Russia.1251  LC_CTYPE=Russian_Russia.1251    
LC_MONETARY=Russian_Russia.1251
[4] LC_NUMERIC=C                    LC_TIME=Russian_Russia.1251    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] xlsx_0.6.1   readxl_1.1.0

loaded via a namespace (and not attached):
[1] compiler_3.5.1   tools_3.5.1      Rcpp_0.12.19     cellranger_1.1.0 
xlsxjars_0.6.1   rJava_0.9-10  

` Any help will be highly appreciated! Thank you in advance!

Melissa J.
  • 15
  • 6
  • Surely you have double-checked the working directory is the right one? Can confirm with `file.exists("тест1.xls")` – s_baldur Nov 24 '18 at 16:11
  • Double checked and recreated the file, still the same `data <- read_excel("тест1.xls", sheet = "food") Error in sheets_fun(path) : Failed to open тест1.xls file.exists("тест1.xls") [1] TRUE ` – Melissa J. Nov 24 '18 at 16:27
  • Furthermore, if I remove cyrillic symbole or replace it with latin ones, it works fine – Melissa J. Nov 24 '18 at 16:34
  • It's not entirely clear to me how this is Rstudio related. Does it work for you in "vanilla R"? – Roman Luštrik Nov 24 '18 at 16:48
  • If this is actually a bug... then here you can find some ideas for workarounds: https://stackoverflow.com/questions/50436328/hack-to-to-include-special-characters-in-file-path-in-havenread-sav – s_baldur Nov 24 '18 at 17:06

0 Answers0