Button guide
Share an R script with colleagues who don't use R Shiny, plumber, or a web form that runs Rscript on your computer
If your colleagues just need to upload a file, set a couple of parameters, and get a cleaned dataset or report back, you can use Button (https://button.bitgate.dev) to put a web form in front of Rscript running on your own computer. The Free plan is $0 for 1 published tool, up to 3 people, and 100 runs per month, and each run can take up to 8 files (up to 25 MB each, 100 MB total) and run for up to 30 minutes. If you need an interactive dashboard where people filter charts in real time, use Shiny instead.
Your options for sharing an R script
How you share the script depends on whether your colleagues need a live interface to explore data, or just need to run a batch job with their own inputs.
Shiny is the better choice when you're building an interactive dashboard. If you want to host it without managing a server, shinyapps.io has a Free plan that gives you 5 apps and 25 active hours per month, and a Starter plan at $13/month (Posit says shinyapps.io users move to Posit Connect Cloud at the end of 2026). For teams with their own infrastructure, Posit Connect is a paid product, and Shiny Server open source (AGPL-3.0) is self-hosted.
A plumber API works when another piece of software needs to call your R code. The R plumber package turns R functions into a REST API using #* annotations. It doesn't solve the colleague problem on its own, though, because someone still has to host the API and build a client or web form for people to use it.
A static R Markdown or Quarto report is the simplest route if the inputs don't change, or if you're happy running the script yourself whenever someone emails you a new CSV and emailing the output back.
Button is built for the "upload data, get the report" workflow. Instead of rewriting your script as a reactive web app or setting up a server with all your R packages, you keep the script on your computer. Button gives your colleagues a web form, passes their inputs to your machine, runs Rscript locally, and sends them the output files to download.
| Option | Best for | Where R runs | Cost / Limits |
|---|---|---|---|
| Shiny (shinyapps.io) | Interactive dashboards | Hosted cloud | Free: 5 apps, 25 active hours/month. Starter: $13/month. Moving to Posit Connect Cloud at the end of 2026. |
| Shiny Server / Posit Connect | Interactive dashboards | Your servers | Shiny Server open source (AGPL-3.0) is self-hosted; Posit Connect is a paid product. |
| plumber | Calling R from other software | Hosted server you set up | Package is free; requires hosting and a separate client or form. |
| R Markdown / Quarto (static) | Fixed reports you run yourself | Your computer | Free. |
| Button | Upload data, get a report or cleaned dataset | Your computer | Free: $0 (1 tool, 3 people, 100 runs/month, 1 GB transfer/month). Pro: $15/month or $144/year (50 tools, 250 people, 5,000 runs/month, 50 GB transfer/month). |
Prepare your R script to take arguments
To run your script from a Button form, take out any hard-coded file paths (like read.csv("~/Desktop/data.csv")) or interactive prompts, and read inputs from the command line using R's built-in commandArgs(trailingOnly = TRUE).
You should take each input file path as an argument, and write your results as files into an output folder that is also passed in as an argument.
Here is a short script, clean_report.R, that takes an input CSV, a numeric threshold, and an output folder path:
args <- commandArgs(trailingOnly = TRUE)
input_csv <- args[1]
threshold <- as.numeric(args[2])
output_dir <- args[3]
raw_data <- read.csv(input_csv)
cleaned <- subset(raw_data, score >= threshold)
out_file <- file.path(output_dir, "cleaned_data.csv")
write.csv(cleaned, out_file, row.names = FALSE)
cat("Rows kept:", nrow(cleaned), "\n")
When Button runs your tool, every form value is passed to the program as its own argument, with no shell, and a value can't start with -. If your script needs fixed flags, you put those into the command you approve during setup, so your colleagues only supply the values for the form fields.
Turn the script into a web form with Button
Once your script reads from commandArgs(), setting up the form takes a few minutes.
- Sign in at https://button.bitgate.dev.
- Install the Button runner on your computer (macOS, Linux, or Windows) using the one-line command the site shows you -
curlon macOS and Linux, or PowerShell on Windows. - Open the local setup page and pick your program (
Rscriptand the path to your.Rfile). - Describe the script's inputs so Button knows what fields to show on the form: text, number, yes/no, choice, or files.
- Publish the tool. Button gives the tool its own page and pins the exact command you approved on your computer by hash.
- Invite your colleagues.
When colleagues open the link from their invite email, they sign in with Google or a one-time email code, fill in the form, press Run, and download the results when it finishes. They don't install R or any packages, and recipients never pay.
If you change the tool later, the people you invited have to confirm the new version before running it. Every run is logged with who ran it and when, and you can revoke a colleague's access or set it to expire at any time.
What to keep in mind when running jobs from your computer
Because jobs run on your computer and never in Button's cloud (Button's servers just relay the form values and files between the browser and your computer), there are a few practical things to know before you share the link:
- Your computer has to be on and online when someone needs to run the script. The tool page shows your colleagues whether your computer is Ready, Busy, or Offline.
- Button runs one job at a time per computer, and each run can take up to 30 minutes.
- You get one computer (runner) per workspace on every plan, and pairing a new computer replaces the previous one.
- File limits are 25 MB per file, and up to 8 files and 100 MB total per run. Logs can be up to 1 MB per run.
- Button deletes inputs 24 hours after a run ends, and deletes outputs after 7 days.
On the Free plan ($0), you can publish 1 tool, invite up to 3 people, and run up to 100 runs and 1 GB of file transfer per month. If you have more scripts or a larger team, the Pro plan is $15/month, or $144/year ($12/month), and raises the limits to 50 tools, 250 people, 5,000 runs per month, and 50 GB of file transfer per month. "People" only counts the distinct colleagues you have invited (you don't count), while runs per month include your own test runs. If you ever downgrade from Pro to Free, it deletes nothing.
FAQ
Do my colleagues need to install R or create a paid account?
No, they only use their web browser. They open the link from their invite email, sign in with Google or a one-time email code, and run the form without installing anything or paying.
What happens if my computer is asleep or turned off when someone visits the form?
Your computer has to be on and online for a job to run. The tool page shows whether your runner is Ready, Busy, or Offline, so colleagues can see right away if your machine isn't available.
Can a colleague pass a malicious command through a text field?
Not through Button. The runner only executes the exact command you approved on your computer (pinned by hash), passes every form value as its own argument without using a shell, and blocks any value that starts with -. The rest is up to your script: treat the value as data and never pass it to system() or eval().
Does Button work with Python or shell scripts too, or just R?
Any program that runs from the command line works, including R, Python, Node, PowerShell, shell scripts, and compiled binaries. You use commandArgs() in R the same way you would use argparse in Python, a param() block in PowerShell, or $1 and $2 in bash.
Last updated
Put your script behind a form
Button turns a script on your computer into a web form. Colleagues sign in, fill it in, press Run and download the results. Free for 1 tool and 3 people.