Problem with initializing RStudio : Error in file(file, ifelse(append, "a", "w")) : cannot open the connection

I have windows 10, and I just downloaded the newest version of R and RStudio and installed them according to the default settings. (in C:\Program Files)
The problem is that every time I try to open RStudio, there is always an error message as the following:

Error in file(file, ifelse(append, "a", "w")) :
cannot open the connection
In addition: Warning message:
In file(file, ifelse(append, "a", "w")) :
cannot open file 'C:\Users\²ÌÐÀæÃ\AppData\Local\Temp\Rtmp4YdN5s\file33384ac742ac': No such file or directory
Error in file(out, "wt") : cannot open the connection
In addition: Warning message:
In dir.create(tempPath, recursive = TRUE) :
cannot create dir 'C:\Users???', reason 'Invalid argument'
Error in file(out, "wt") : cannot open the connection

Also, every time I open RStudio, the program tries to generate a new file with an unreadable code in C:\Users.
Another problem is that I can not type in my code properly. Every time I try to type something, there is a windows popping up saying "R code execution error".

I would appreciate it if anyone could help me out.

Thank you!

It seems like you have non ASCII characters in your windows user name, R has problems with that, try changing your user name to something without non ASCII characters and empty spaces.

Hello Anresrcs,
Thank you very much for the suggestion. However, although I changed my windows user name, the folder in c:\users refused to change its name.
So I think that one possibility to dodge the problem would be to force rstudio to set the default working space to another directory, whose name should be recognizable by R.
Do you know how to do that ?

Thank you!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.