In the introduction to his book R packages, Hadley Wickham provides a neat function for making sure that everything is set for writing your own R extensions, by simply running the
devtools::has_devel(), which, if all goes well, should evaluate to
This did not work out for me and I had to fix this problem on 2 different occasions so I felt I need to share this info in case there are others also stumped by this hurdle.
The fix I found – after a full sweaty day – was in this conversation on GitHub and I would like to break it down very quickly:
- Make sure you have installed Rtools from CRAN
- Make sure that Rtools/bin as well as Rtools/MinGW/x64/ are added to your system PATH (if you don’t know how, click here)
- In addition, it is recommended that you install LATEX (the link is also found on the Rtools page mentioned on No. 1)
- Run the following lines of code
install.packages("devtools") library(devtools) install_github("hadley/devtools") # to get the latest 'pre-CRAN' package updates find_rtools() has_devel() # output should be TRUE
Like I said, I had this problem on 2 different machines (Windows 7 and 10) and the same fix worked on both of them.