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.
has_rtools() determines if Rtools is installed, caching the results.
rtools_path() to find out where it's installed.
1 2 3 4 5
Either a visible
TRUE if rtools is found, or an invisible
FALSE with a diagnostic
As a side-effect the internal package variable
updated to the paths to rtools binaries.
This code borrows heavily from RStudio's code for finding Rtools. Thanks JJ!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.