error in starting R studio

I do need help in something. I'm a beginner user in R and have a problem when trying to install packages. Well i cant do anything as i face this in my script:

"Error in tempfile(pattern = ".rstudio-", tmpdir = lib) : unable to translate 'C:/Users/BILL/OneDrive/<U+0388><U+03B3><U+03B3><U+03C1>afa/R/win-library/4.1' to native encoding In addition: Warning message: In base::list.dirs(.libPaths(), full.names = FALSE, recursive = FALSE) : unable to translate 'C:/Users/BILL/OneDrive/<U+0388><U+03B3><U+03B3><U+03C1>afa/R/win-library/4.1' to native encoding"

What are you trying to do when you get this error message? Ideally we'd have a reprex to work with (FAQ: How to do a minimal reproducible example ( reprex ) for beginners), but at least the text from your R console would be helpful.

R has problems with cloud-synced folders (OneDrive in your case) and non-ASCII characters on the library path, I recommend you to set your package library in a non-synced folder that doesn't include non-ASCII characters.

You can change the default library folder by setting your R_LIBS_SITE environmental variable in a .Reviron or .Rprofile file. For example:

# In a .Renviron file you can set it by adding a line like this one with the desired location 
R_LIBS_SITE="C:\\Program Files\\R\\R-4.1.2\\library"

For a more detailed explanation, you can read this blog post

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.