Custom building of non-package RStudio projects

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":

  1. Use Makefile
  2. 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?



This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.