Skip to content

Rtools required

10 messages · Duncan Murdoch, Steven Yen, Jiefei Wang

#
Dear All

I updated to R-4.0.0. and also installed the latest Rtools 4.0 (to now 
the new default folder c:\rtools40). While compiling a package (binary) 
I received the follow marning message saying Rtools is required. Any 
clues? Thanks.

Steven Yen

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/
#
On 28/04/2020 5:57 a.m., Steven T. Yen wrote:
Presumably you didn't put it on your path, or you used a non-standard 
way to build.  You need to say what command you used.

Duncan Murdoch
#
Thanks. I visited the Rtools web page and learned to run the following 
lines. I am still getting the same warning message.

 > writeLines('PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"', con = 
"~/.Renviron")
 > Sys.which("make")
 ????????????????????????????? make
"C:\\rtools40\\usr\\bin\\make.exe"
On 2020/4/28 ?? 08:39, Duncan Murdoch wrote:
#
On 28/04/2020 9:56 a.m., Steven Yen wrote:
And you are still not telling us what command you used to trigger that 
message.

Duncan Murdoch
#
In RStudio, I enter File -> Open Project -> and browse to open a .Rproj 
file. Then, I click Build -> Build Binary Package. Thanks.
On 2020/4/28 ?? 10:55, Duncan Murdoch wrote:
#
On 28/04/2020 11:02 a.m., Steven Yen wrote:
Do it the standard way instead of using devtools.

Duncan Murdoch
#
Thanks. Can you kindly tell me what to read to do it the "standard way"? 
Also, where can I find file .Renviron.
On 2020/4/28 ?? 11:08, Duncan Murdoch wrote:
#
On 28/04/2020 11:16 a.m., Steven Yen wrote:
Start with ?INSTALL, and find more details in the Writing R Extensions 
manual.  I believe RStudio can be configured to use those tools rather 
than the devtools ones, but I don't know if it will still run its test 
for Rtools if you do it that way.

I imagine you can also update RStudio and all of your packages; 
eventually that will work, if this is really the issue.

Duncan Murdoch
#
Thanks. Updating RStudio to 1.2.5042 did fix the problem. Thank you!
On 2020/4/28 ?? 11:30, Duncan Murdoch wrote:
#
I do not exactly know what is going on with your problem but it is better
to use the old-school method to install the package so that you can avoid
any problems with Rstudio.
how to add the Rtools and R to the environment variable PATH:

https://www.computerhope.com/issues/ch000549.htm

 Then go to the command prompt, here is how:

https://www.howtogeek.com/235101/10-ways-to-open-the-command-prompt-in-windows-10/

Type R and enter. If you can see welcome information from R, that means at
least you have correctly added R into PATH. Check whether the R version is
4.0

Type "q()" to quit R, then go to the directory where your package is. For
example, if your package is in "D:\packages\mypackage", go to
"D:\packages\".

Type "R CMD INSTALL  mypackage", replace mypackage with the true folder
name of your package.

If everything is correct, you should be able to install the package. If you
get the same error, type "echo %PATH%" and post here so we can know exactly
what is going on.

Best,
Jiefei

On Tue, Apr 28, 2020 at 11:39 PM Duncan Murdoch <murdoch.duncan at gmail.com>
wrote: