devtools (version 1.13.5)

setup_rtools: Find rtools.

Description

To build binary packages on windows, Rtools (found at https://cran.r-project.org/bin/windows/Rtools/) needs to be on the path. The default installation process does not add it, so this script finds it (looking first on the path, then in the registry). It also checks that the version of rtools matches the version of R.

Usage

setup_rtools(cache = TRUE, debug = FALSE)

Arguments

cache

if TRUE will used cached version of RTools.

debug

if TRUE prints a lot of additional information to help in debugging.

Value

Either a visible TRUE if rtools is found, or an invisible FALSE with a diagnostic message. As a side-effect the internal package variable rtools_path is updated to the paths to rtools binaries.

Acknowledgements

This code borrows heavily from RStudio's code for finding rtools. Thanks JJ!