[R] Rtools and things dependent on it

Jeff Newmiller jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Sat Feb 24 02:06:21 CET 2024


RTools is a set of command-line programs needed for compiling R and its packages on Windows. You don't need it if your OS is not Windows.

In theory, users on Windows should not need to worry about compiling packages to binary (zip) form, because CRAN compiles the source code for every package that supports Windows and just updating in a few days should bring in the current binaries. In practice, that task seems to always be lagging for certain packages, so you may end up using old versions of packages if you only rely on binary packages. Tidyverse packages seem to be among the worst in this respect.. there are many many dependencies and getting just one old one can make it all but impossible to get a current set of top-level Tidyverse packages. I think this is the strongest argument for teaching beginners to use Bsse R at first... the most plaintive cries come from beginners tasked with preparing their Windows computers to use tidyverse for their "class" at times when the binary files are very out of date.

Once installed and an RtoolsXX directory is present, it is still necessary to add the Rtools\mingw64\bin directory to your PATH environment variable so R can find it. Unfortunately there is no one way to do this because some people use multiple versions of R/Rtools and you can't just add all of them to your PATH. One of my preferred ways is to put the following in a newly-created .Rprofile text file in the Documents directory

Sys.setenv( PATH=paste( "C:\\Rtools43\\mingw64", Sys.getenv( "PATH" ), sep=";" ) )

after restarting R it should be ready to install source packages when needed.

The problem is that beginners rarely remember doing this and after updating to R/Rtools 4.4.0 they will not understand why all their existing packages disappear (they must be reinstalled for each x.y version of R) nor why the source install doesn't work anymore (the 43 in their .Rprofile file which they have long ago forgotten must be updated to 44).

On February 23, 2024 3:39:28 PM PST, "Sorkin, John" <jsorkin using som.umaryland.edu> wrote:
>Avi ,
>Your question is not dumb. Let me ask a more fundamental question. What is R tools, what does it do, and how is it used. From time to time, I receive a message when I down load a package saying I need R tools. When I receive the message, I don’t know what I should do, other than down load R tools.
>John
>John David Sorkin M.D., Ph.D.
>Professor of Medicine
>Chief, Biostatistics and Informatics
>University of Maryland School of Medicine Division of Gerontology and Geriatric Medicine
>Baltimore VA Medical Center
>10 North Greene Street<x-apple-data-detectors://12>
>GRECC<x-apple-data-detectors://12> (BT/18/GR)
>Baltimore, MD 21201-1524<x-apple-data-detectors://13/0>
>(Phone) 410-605-711<tel:410-605-7119>9
>(Fax) 410-605-7913<tel:410-605-7913> (Please call phone number above prior to faxing)
>
>On Feb 23, 2024, at 5:34 PM, avi.e.gross using gmail.com wrote:
>
>This may be a dumb question and the answer may make me feel dumber.
>
>I have had trouble for years with R packages wanting Rtools on my machine
>and not being able to use it. Many packages are fine as binaries are
>available. I have loaded Rtools and probably need to change my PATH or
>something.
>
>But I recently suggested to someone that they might want to use the tabyl()
>function in the janitor package that I find helpful. I get a warning when I
>install it about Rtools but it works fine. When they install it, it fails. I
>assumed they would get it from CRAN the same way I did as we are both using
>Windows and from within RSTUDIO.
>
>In the past, I have run into other packages I could not use and just moved
>on but it seems like time to see if this global problem has a work-around.
>
>And, in particular, I have the latest versions of both R and RSTUDIO which
>can be a problem when other things are not as up-to-date.
>
>Or, maybe some people with R packages could be convinced to make binaries
>available in the first place?
>
>Avi
>
>
>   [[alternative HTML version deleted]]
>
>______________________________________________
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-help&data=05%7C02%7CJSorkin%40som.umaryland.edu%7C8d5f2c8346f24559a7f908dc34bf9979%7C717009a620de461a88940312a395cac9%7C0%7C0%7C638443244987424663%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C60000%7C%7C%7C&sdata=BO9wgkrjNmI4j2deiBDxHw%2F9tVjynfQYEHhBZ8BGq%2Fk%3D&reserved=0
>PLEASE do read the posting guide https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.r-project.org%2Fposting-guide.html&data=05%7C02%7CJSorkin%40som.umaryland.edu%7C8d5f2c8346f24559a7f908dc34bf9979%7C717009a620de461a88940312a395cac9%7C0%7C0%7C638443244987432863%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C60000%7C%7C%7C&sdata=kVnTbE6ZEpmJ88Zmu%2FUbUH%2F%2FnjoSHSmDjuIxxxw3uz8%3D&reserved=0
>and provide commented, minimal, self-contained, reproducible code.
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

-- 
Sent from my phone. Please excuse my brevity.



More information about the R-help mailing list