Menu

Online R Compiler

Write, run, and share code snippets — no setup required.

script.R
Output
Click Run to see the output here.

Run R online in your browser

A free online R playground and code runner. Write R scripts in your browser, hit Run, and Rscript executes them in seconds. No RStudio, no local R install, no install.packages() wait to configure first.

The editor is built on the same engine as VS Code, so R syntax highlighting, autocompletion, and error squiggles all work. Code runs with Rscript on Alpine Linux, with dplyr, tidyr, stringr, and jsonlite pre-installed — the tidyverse core for data wrangling. Good for exploring a data frame, testing a regex with stringr, or parsing JSON with jsonlite.

What makes this R playground useful

  • Instant R execution — write code, press Run, and see output from Rscript in seconds, no install.packages() wait or RStudio setup needed.
  • Full R syntax highlighting, autocompletion, and clear error messages with line numbers, powered by the same editor engine as VS Code.
  • Stdin input is supported. readLines('stdin') and file('stdin') read from the playground's input box, so scripts that take interactive input or parse piped data work end-to-end. No R interpreter, RStudio, or CRAN mirror on your end.
  • R with dplyr, tidyr, stringr and jsonlite pre-installed — run real tidyverse data-analysis snippets without installing RStudio or the tidyverse locally.

What you can try in the R playground

  • Base-R vectors, data frames, and apply-family functions: the foundation you need before reaching for the tidyverse.
  • Tidyverse data pipelines: dplyr (filter, mutate, summarise, group_by) composed with the magrittr pipe, and tidyr pivot_longer / pivot_wider reshapes.
  • Quick R experiments: test a regex with stringr, parse a JSON blob with jsonlite, verify a statistical summary, or confirm how a grouped summarise behaves.

Online R compiler FAQ

Is the online R compiler free?
Yes, the R playground is free to use. No sign-up, no R to install, and no RStudio license — open the page and run scripts immediately.
Do I need R or RStudio installed?
No install needed. You don't need R, RStudio, or the tidyverse on your machine. The online R runner executes your script with Rscript and dplyr, tidyr, stringr, and jsonlite already loaded.
Does the R playground work on mobile and Chromebooks?
Yes. The R playground runs in any modern browser, on desktop, tablet or mobile. Good for running R scripts from a Chromebook, iPad, or school computer without installing RStudio.
Can I use readLines('stdin') in the online R compiler?
Yes. readLines('stdin') and file('stdin') read your typed lines the same way they would when you pipe input to Rscript script.R at the terminal. Useful for scripts that process ad-hoc data without a file upload.
How do I learn R after trying the playground?
Edit the sample R code, press Run, and iterate. When you want something more structured, Coddy's interactive R course covers vectors, data frames, the tidyverse, and visualization with hands-on exercises — a solid base whether you're headed for stats, data science, or bioinformatics.