Problem with Home Directory: "Error in nchar(homeDir) : invalid multibyte string, element 1" in R version 4.2

Hi

I am having so many problems with the accent of Ú in the name of my home directory (C:/Users/JESÚS/AppData/Local/R/win-library/4.2). It does not allow me to install so many packages that I need. Apparently in the latest version of R it is possible to activate the experimental utf8 encoding. Would that solve the problem? If so, How can I do it? Any help would be very welcome.

Thanks in advance

Not in R, you need to enable it on Windows but have in mind that this might have unexpected repercussions like not being able to open existing xlsxm files

https://helpcenter.nshift.com/hc/en-us/articles/360016886479-Errors-caused-by-Windows-10-Unicode-UTF-8-encoding#:~:text=Open%20Windows%20Control%20Panel%20->%20Region,OK%20and%20restart%20your%20computer.

Another option would be to set your default package library in another folder without non-ASCII characters in its path.

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 42 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.