There are two folders on my desktop and they include the same files. It seems, directories (paths) containing non-English characters don't work in my current windows environment.
> setwd("C:/Users/my_user/Desktop/folder_name_including_only_english_characters")
> list.files()
[1] "test.csv" "test.jpg" "test.pdf" "Test.R" "test.sql" "test.xlsx"
> setwd("C:/Users/my_user/Desktop/folder_name_including_non_english_characters_like_ıüö")
> list.files()
character(0)
I am not sure whether this is something related with the settings of R or windows 10.
I don't have such an issue with my other computer.
UPDATE:
During my recent tries, I have noticed that, although the list.files() function fails, R can still read files from the directories containing non-English characters using the built in read.csv2 function. However, when I tried to read xlsx files, for example:
openxlsx::read.xlsx(paste0("C:/Users/my_user/Desktop/folder_name_including_non_English_characters_like_ıüö","/test.xlsx"))
it gives the error below. (btw, openxlsx::read.xlsx() function reads the files from directories containing only English characters successfully.
Error in file(con, "r") : invalid 'description' argument
In addition: Warning message:
In unzip(xlsxFile, exdir = xmlDir) : error 1 in extracting from zip file
I suspect the reason behind both the fail of the function list.files() and the error on using openxlsx::read.xlsx() function may be the same.
My question is: what setting(s) should I change to make R successfully recognize the directories containing non-English characters?