This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How can I put the Rtools on PATH?

I Installed the last version of R. Now when I use install.packages function, it gives me this warning:

 >install.packages("limma")
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/src/contrib:
  cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/HAMRAH/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/src/contrib:
  cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
Warning in install.packages :
  package ‘limma’ is not available (for R version 4.0.0)
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/bin/windows/contrib/4.0:
  cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/PACKAGES'

I downloaded the Rtools from the address https://cran.rstudio.com/bin/windows/Rtools/ and installed Rtools. But in the address, it is said that after installing the package we should put the Rtools on PATH. I don't know how to do this. I will be grateful if you help me.

r

1 answer

https://cran.r-project.org/bin/windows/Rtools/

Yes. I saw that but my problem is that I don't understand the meaning of this:

You can do this with a text editor, or you can even do it from R like so: writeLines('PATH="${RTOOLS40_HOME}\usr\bin;${PATH}"', con = "~/.Renviron")

when I copy and paste this line in R

writeLines('PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"', con = "~/.Renviron")

and then restart R, I can not install.packages yet. and the warning stays.

Log in to answer this question.