Run R Online
Run R code, R in Jupyter notebooks, RMarkdown, or even Knitr/Rnw in a full, remote online R environment.
CoCalc makes working with R easy
CoCalc handles all the tedious details for you, regardless of whether you want to work on the command line, run Jupyter Notebooks, create RMarkdown files, or use Knitr in documents.
This page is about ways to use R in the CoCalc platform.
Zero setup
- No need for you to download and install R.
- CoCalc already provides many packages for you.
- The LaTeX editor is already integrated with R.
- You no longer have to maintain everything on your own.
Start working by creating or uploading R files, RMarkdown documents, or Jupyter notebooks.
Start free today. Upgrade later.
Feature Overview
There are many ways to use R online via CoCalc.
R in Jupyter Notebooks
CoCalc offers a complete rewrite of the classical Jupyter notebook interface. It is tightly integrated into CoCalc and adds real-time collaboration, TimeTravel history and more.
There is also support in CoCalc for easily using R with the classical Jupyter notebook and JupyterLab.
Collaborative editing without limits
Privately share your project with an unlimited number of collaborators. Simultaneous modifications of your document are synchronized in real time. You see the cursors of others while they edit the document and also see the presence of watching collaborators.
Additionally, any compilation status and output is synchronized between everyone, because everything runs online and is fully managed by CoCalc.
This ensures that everyone involved experiences editing the document in exactly the same way.
Extensive support for R
The fully integrated CoCalc editor covers all your basic needs for working with
.tex
, .Rnw
and .Rtex
files. The document is synchronized with your collaborators in realtime and everyone sees the same compiled PDF. In particular, this editor- Manages the entire compilation pipeline for you,
- Automatically processes
.Rnw
and.Rtex
files using Knitr, - Supports forward and inverse search to help you navigating in your document,
- Captures and shows you where each or R error happened,
- and you can useTimeTravelto go back in time to see your latest edits and easily recover from a recent mistake.
This means you can move your entire workflow online to CoCalc:
- Upload or fetch your datasets,
- Use Jupyter Notebooks to explore the data and test your hypothesis,
- Discuss and collaborate with your research team,
- Write your research paper in an
.Rtex
or.Rnw
document, - Publish your datasets, your research code, and the PDF of your paper online, all hosted on CoCalc.
RMarkdown support
You can edit RMarkdown files in CoCalc's code editor, as explained here.
The source file is processed according to the YAML-frontmatter configuration and the view of the generated file is automatically updated in an HTML or PDF panel.
Syntax highlighting for markdown and embedded programming code—according to their language—makes it easy to visually understand the source file.
CoCalc's library features selected example files to get started quickly: e.g. HTML reports, article templates and a beamer presentation.
Code formatting
CoCalc is able to format your R code.
By simply clicking one button, your R source code is formatted in a clean and consistent way using the formatR package.
This reduces cognitive load reading source code, brings everyone in the team on the same page, and reduces misunderstandings.
R code formatting works with pure
.r
files and Jupyter Notebooks running an R kernel. Command line support
All your existing R scripts run on the command line right in CoCalc. Open a Terminal and you find yourself in a familiar Linux shell with a local filesystem for your data files, access to Git and a large number of commands... Feel at home and run your analysis as usual!
Terminals can be used by multiple users at once. This means you can work with your collaborators in the same session at the same time. Everyone sees the same output, and via side chat next to the terminal, the whole team can coordinate.
Beyond that, you can simultaneously work with several terminal sessions. This gives you the ability to run your code concurrently.
For long-running programs, you can even close your browser and check on the result later.
Chatrooms and side chat
Collaboration is a first class citizen on CoCalc. A side-by-side chat next to your R code, files and notebooks makes it easy to discuss content with your colleagues or students. You can also create dedicated chatrooms.
Avatars show who is currently working on a file.
Collaborators who are not online will be notified about new messages the next time they sign in.
Chat also supports markdown formatting and formulas.
Managed R Environment
CoCalc makes sure that the computational environment for R is regularly updated and ready to work with. Our goal is enabling you to get started with your analysis without any overhead.
Look at our list of available packages in more detail. If something is missing, please tell us about it (contact [email protected]) so we can install that package globally.
Publishing
CoCalc helps you share your work with the world. It offers its own hosting of shared documents, alongside with any associated data files.
You can configure if your published files should be listed publicly, or rather only be available via a confidential URL.
Snapshot backups
Snapshots are consistent read-only views of all your files in a CoCalc project. You can restore your files by copying back any that you accidentally deleted or corrupted.
TimeTravel
The TimeTravel feature is specific to the CoCalc platform. It records all your changes in editable files like R source code, Jupyter notebook and documents in fine detail. You can go back and forth in time across thousands of changes to recover your previous edits.
This allows you to easily recover any part of any version of your file by copying and pasting. You can also see exactly what changed from one version to the next.
You can visualize the entire process of creating a Jupyter notebook from the start. This lets you discover how you arrived at a particular solution and see what you (or your student) attempted before the final solution.
Start free today. Upgrade later.