Rtools and Cygwin on MS Windows

[This article was first published on Gregor Gorjanc, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Duncan Murdoch provides Rtools which ease the installation of tools that are needed to do R package development/testing on MS Windows. The Rtools is a collection of various tools. However, if you also use Cygwin on MS Windows, you can expect problems since Rtools also includes some tools from Cygwin. The problem is the version collision of fundamental Cygwin libraries. Basically, this means that you will not be able to use Cygwin and if you have C:/Cygwin/bin in the PATH envorinmental variable, you can expect problems also in the Command Prompt. You can try to fuse both “worlds” as described in the documentation, but is seems tricky. I just used the following to make my life easier:
  • Install Rtools and do not modify the PATH envorinmental variable –> this means that you will still be able to use Cygwin without problems
  • Create a BAT script (say on the Desktop) with the following content
rem --- Add RTools to the PATH ---
set PATH=c:ProgramsRRtoolsbin;c:ProgramsRRtoolsperlbin;c:ProgramsRRtoolsMinGWbin;%PATH%

rem --- Start the Command Prompt ---
  • Start the script with the double click and you will get a working environment for R package development/testing
Btw. under Linux or Mac you can test the functionality of R package under MS Windows using the win builder at http://win-builder.r-project.org provided by Uwe Ligges

To leave a comment for the author, please follow the link and comment on their blog: Gregor Gorjanc.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)