I'm looking into ways to customize building of RStudio projects that are not packages taking advantage of the "Build" tab of RStudio that, at the same time, will be platform-independent, does not require additional programs, configuration or any kind of technical hustle.
I believe at this moment there are two viable options in "Customize build tools":
- Use Makefile
- Use "Custom" and provide a script.
Option 1 is great, but installing/configuring GNU make on some of the platforms may be tricky for non-technically-oriented people.
Option 2 seems to be limited to shell scripts and RStudio seems to delegate executing it to the operating system (plz correct me if I'm wrong). For example, if I write a Bash script, define it as a "Custom" build script and use "Build all" button then on Windows the script is executed in a separate window (git bash?) instead of the RStudio Build tab.
What I would love to have is to be able to define a Custom R script that will build the project. At this moment if an R script is provided as a "Custom" build script pressing "Build All" will just open it in RStudio editor, which I believe is a default OS action associated with .R files (again, correct me if I'm wrong). Changing default OS behavior is out of the question for me.
Is it feasible for you to add yet another option in "Configure build tools", say, "R script" that will be sourced when "Build All" is pressed?