Skip to content

Rtools required

14 messages · Steven Yen, John Fox, Henrik Bengtsson +5 more

#
Dear Steven,

Did you follow the instruction on the Rtools webpage to add 

	PATH="${RTOOLS40_HOME}\usr\bin;${PATH}"

to your .Renviron file?

I hope this helps,
 John

  -----------------------------
  John Fox, Professor Emeritus
  McMaster University
  Hamilton, Ontario, Canada
  Web: http::/socserv.mcmaster.ca/jfox
#
Thanks John. Where is file .Renviron located? It must be a hidden file. 
I cannot find it.
On 2020/4/28 ?? 08:29, Fox, John wrote:
#
Hello John,

Perhaps you can help me. I am an idiot. I visited the Rtools web page 
and learn to run the following lines in R: Still I am 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:29, Fox, John wrote:
#
Dear Steven,
The first command writes the modification to your path in the .Renviron file in your home directory, which should be executed at the start of each R session. I assume that you executed the second command in a fresh session, and it indicates that the Rtools are indeed accessible. 

Given that, I don't know why you're still having a problem, assuming that you tried to build the package in a fresh session *after* you created .Renviron.

Sorry I can't be of more help,
 John
1 day later
#
Type
?.Renviron
?R.home
?"environment variables"

at the R prompt to get what I think should be the info you need (or at
least useful info).


Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Wed, Apr 29, 2020 at 2:37 PM Steven <syen at hqu.edu.cn> wrote:
#
Dear Steven,

It's possible that Windows will hide .Renviron, but it's generally a good idea, in my opinion, in Folder Options > View to click "Show hidden files" and uncheck "hide extensions". Then .Renviron should show up (once you've created it).

Best,
 John
#
Careful so you don't overwrite an existing ~/.Renviron file; it's safer to
use something like:

cat('PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"\n', file="~/.Renviron"
append=TRUE)

/Henrik
On Wed, Apr 29, 2020, 15:33 Fox, John <jfox at mcmaster.ca> wrote:

            

  
  
#
Thanks to all - very helpful. I search from c:\ and now find file 
.Renviron located in C:\Users\USER\Documents. That does it.

I would like to pose an additional question, since it would also fall 
under the same subject line. This is an RStudio question but since I am 
using the free version the RStudio folks would not help me.

My students simply need to install packages and are not building any 
packages so they have no reason to install Rtools.

When they install (not build) packages (from CRAN or file archive) they 
received the same warning message saying

"Rtools required to build a package".

This is nonsense of course as they are, as I said, simply installing. I 
tell them to user an older RStudio version, specifically 1.1.463 that's 
free of that warning. Any idea?

Steven Yen
On 2020/4/30 ?? 06:30, Fox, John wrote:
#
Wouldn't packages that have to be built from source on installation
require Rtools?

Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Wed, Apr 29, 2020 at 6:48 PM Steven <syen at hqu.edu.cn> wrote:
#
????? I just encountered something that looks exactly like that with R 
4.0.0 and the latest RStudio AND with Rtools40 installed under Windows 
10 (AND some manual adjustment of the path to delete references to old 
versions of Rtools and make sure Rtools40 was there).


 ????? I got around it by have Rtools40 installed AND running 
"install.packages('xmlw')" inside R 4.0.0 inside a CMD prompt.? That 
worked, even though the same command inside RStudio failed with:


WARNING:? Rtools is required to build an R package but no version of 
Rtools compatible with the currently running version of R was found.? 
Note that the following incompatible version(s) of Rtools were found:

 ????? - Rtools 3.5 (installed at C:\Rtools).


 ????? I got this message after deleting references to C:\Rtools from 
the path and rebooting.


*** I BELIEVE YOU NEED Rtools40 installed, because binaries for some 
packages are not (yet) available for R 4.0.0.


 ????? Hope this helps.
 ????? Spencer Graves
On 2020-04-29 21:02, Bert Gunter wrote:
#
Good point, but I am bothered by the non-discrimatory warning message to 
all package installation attempts. My students install mostly binary 
files, and I just hate to have them install Rtools. For one, they have 
not had to do so until after RStudio-1.1.463. The fact that using this 
older RStudio? can avoid the annoying warning message speaks volume.
On 2020/4/30 ?? 10:02, Bert Gunter wrote:
#
On Wed, Apr 29, 2020 at 11:37 PM Steven <syen at hqu.edu.cn> wrote:
That looks OK. Did you restart rstudio?

How exactly are getting this error? Are you using install.packages()
in R? Or using the pkgbuild package?

Also are you running the latest version of rstudio? I think old
versions may have had difficulty finding rtools40.
#
I think you probably wrote to the wrong place at RStudio.  You won't get 
help from their help desk without a paid license for the software, but 
they run community forums (similar in aim to this mailing list) where 
community members are often pretty helpful.

In any case, this is the wrong place to ask for help on RStudio.

Duncan Murdoch
On 29/04/2020 9:48 p.m., Steven wrote:
#
Minimize the number of referenced contributed packages, and inform your students that they can (should?) opt to not install from source when prompted.

In fact, this could be a use case where using the checkpoint package could help you manage version conflicts ... once you find a time point for which all of the packages you want them to use seem to play well together, then they can invoke the checkpoint and be on the same page with you.

Of course, you will have to make other sacrifices, like using an older version of R (I don't think the MRAN historical package archive is keeping up) and not having access to some cool stuff from recent advances in package features, but there aren't many options that can keep 15000+ packages all working and bugfixed in sync.
On April 29, 2020 8:00:43 PM PDT, Steven <syen at hqu.edu.cn> wrote: