I wanted to install a new package (gpinter) and I was using older versions of R and Rstudio (RStudio-pro-1.4.1717-3 and R-4.1.0-win ). The console said that this package gpinter was not available for my versions of R. So I desinstalled them and reinstalled the latest versions (R-4.1.2-win and RStudio-2021.09.2-382).
From this moment on, nothing worked. I could not install properly Rtools, I was getting these messages alternatively:
warning message: in normalizepath(path.expand(path), winslash, mustwork)
-install.packages exir does not exist
I could not install ANY package!
I tried pretty much everything. Creating myself .Rprofile and .Renviron files. Did not work. I looked at Sys.getenv(): HOME was written incorrectly because of French accent. I corrected it but it still didn't work. After one day of trying, I decided to reinstall my previous versions of Rstudio and R. It worked right away. I still can't install gpinter, but apart from that, I can install every package I want.
Did anyone else have this huge problem with the last version of R?
You are getting this error message because gpinter is not in CRAN, you have to install it from Github with this command:
remotes::install_github("thomasblanchet/gpinter")
RTools is a separate software that you need to install in your system, not in R, so the installation process itself can't be related to your R version, maybe you mean that you can't configure R to recognize your RTools installation? If so, can you please post the complete error message you get?
About gpinter, this I what I did (with an older versions of R that I have resinstall yesterday), I run:
install_github("thomasblanchet/gpinter") and it said It was not available on this version of R. I now have tried with remotes as you said and it worked, thank you (still with an older version of R)!
However, to explain the problem with the latest version of R, here is what I did yesterday and could not fixed. I updated R with the latest version. I did that: install R, then Rstudio, then Rtools. Then I runned the command :
write('PATH="{RTOOLS40_HOME}\\usr\\bin;{PATH}"', file = "~/.Renviron", append = TRUE)
(All of this had worked when I had install the older version of R). It started not working from this moment on, because it said:
Warning in normalizePath(path.expand(path), winslash, mustWork) :
path[1]="C:\Users\myname\Documents\R\win-library\4.1": specified file impossible to find
Then whenever I tried to install a package (for example readxl), It said the thing above or something like:
exir does not exist
I have spent time on the forum, and I have seen other that seems to have similar problem:
My explanations would be (but I may be wrong): with the latest version of R, R doesn't handle well (or at all) special characters (in Chinese, French, Spanish,etc). However, when we install Rtools, we need to install someting on the user library, it refuses to install directly on C:. And as some person have special characters in their ursername, and as some person can't change their username (because of administrator rights or whatever) they can't install Rtools or other packages, while they could perfectly do it with older versions of R. Me, I have decided to stay with an older versions of R, I hope this problem will be fixed with even newer versions of R.