Eva
Eva

Reputation: 851

How do I configure Rtools40 in Windows 10 with R 4.0.0?

I recently installed R 4.0.0. Along with it, I also installed Rtools40. The CRAN website said I also need to specify path for Rtools make file in the .Renviron file. But when I created the .Renviron file, I cannot use stats package. If .Renviron file exists, it gives error that some shared dll file is missing. And if I delete the .Renviron file, this error goes away, but I cannot compile packages using Rtools40. How can I configure this .Renviron file so that I can also use both - Rtools40 and stats package? My Rtools make file is in C:/(MyUserName)/Rtools40/usr/bin folder. This same folder also contains the bash file, which came with Rtools40.

Upvotes: 3

Views: 5577

Answers (2)

AJW
AJW

Reputation: 21

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

I had the same problem. I was following the Rtools40 download instructions, and instead of adding Rtools to the beginning of the path, adding it to the end fixed it.

Upvotes: 2

James Silva
James Silva

Reputation: 70

I have been always using a folder "C:\s" to deploy the always changing versions of R related software friends. I recently installed Rtools40 to "C:\s\rtools40" and linking it with my R-4.0-1 was straightforward to me. I just went to "C:\s\R-4.0.1\etc\x64", edited the "Makeconf" file using WordPad, and replaced the line

RTOOLS40_HOME ?= c:/rtools40

With

RTOOLS40_HOME ?= c:/s/rtools40

Then I did the same for "C:\s\R-4.0.1\etc\x32". After these, I installed a package using RStudio (running install.packages("jsonlite", type = "source") in the R-4.0.1 console), and no warning related to Rtools was displayed in the console. I hope this works well in your machine.

Upvotes: 0

Related Questions