I can't install any package please help me

install.packages("swirl")
Installing package into ‘C:/Users/مقداد/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
unable to translate 'C:\Users<U+0645><U+0642><U+062F><U+0627><U+062F>\Documents\R\win-library\4.0' to native encoding
Warning in install.packages :
unable to translate 'C:/Users/<U+0645><U+0642><U+062F><U+0627><U+062F>/Documents/R/win-library/4.0' to native encoding

R has problems with non-ASCII characters in your package library path.

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

# In a .Renviron file you can set it by adding a line like this with your desired folder path
R_LIBS_SITE="C:\\Program Files\\R\\R-4.0.3\\library"

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

I work on Windows , and i put these
R_LIBS_SITE="C:\Program Files\R\R-4.0.3\library"
On console?

Not in console, please check the blog post in the link I gave you for more details.

I didn't understand I was thinking if I could download the swirl package and put it in the library file in R I think it would work but I don't know how I can download the swirl package as a file

I didn't understand I was thinking if I could download the swirl package and put it in the library file in R I think it would work but I don't know how I can download the swirl package as a file

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.