Organize & Run Build Scripts Comfortably
Working with reproducible reports or any other similar projects often requires to run the script that “builds” the output file in a specified way. buildr can help you organize, modify and comfortably run those scripts. The package provides a set of functions that interactively guides you through the process and that are available as RStudio Addin, meaning you can set up the keyboard shortcuts, enabling you to choose and run the desired build script with one keystroke anywhere anytime.
And the development version () from GitHub with:
First, load the package with:
You can skip the step above and prepend
buildr:: to every function call. That could be handy if you use buildr functions only occasionally.
init(), which initializes a special
Makefile in project root with automatically discovered build scripts that share a common prefix and separator (“build” and “_“, by default).
Makefile is a standard”recipe book" which tells the software how it should be compiled. It’s so general it can serve perfectly for our purposes. See the documentation for GNU Make or read
vignette("know_your_buildr") vignette of buildr.
If you have only one build script, you may just proceed by calling
build(). However, the strength of buildr lies in the ease with which you can choose the desired script and run it when your project is populated with many of them. To do so, call
aim() and choose among the scripts buildr discovered for you.
aim() will set one of the
Makefile targets to be recognized by RStudio Build pane.
That’s it! To learn more about buildr,
Makefiles or other relevant stuff, please refer yourself to the
vignette("know_your_buildr") vignette, which describes how to use buildr as an Addin, how to define your keyboard shortcut and much more.
This program is free software and you can redistribute it and or modify it under the terms of the GNU GPL 3.