R IDE

DISCLAIMER

R IDE in CoCalc is the open source edition of RStudio. Posit Software, PBC is in no way associated with CoCalc.

There are a number of ways to use R in CoCalc.

Collaborative X11 Application

You can create X11 Graphical Desktop, then click R IDE in the application list at the bottom left and wait about 20 seconds. The advantage is real-time collaboration just as with any other X11 application, but the response time may be slow.

Notebook Server

Click on the Servers / Notebook Servers tab and launch R IDE :

Launching R IDE Server

Launching R IDE Server

Compute Server

If you need more powerful compute resources, use Compute Servers with R Statistics image. Here CoCalc’s CEO and Founder William Stein explains how to run it:


R Markdown

Open a *.Rmd or *.rmd file to work with R Markdown. Depending on the configuration in the preamble, you either produce an HTML or PDF output. Do not forget to switch the panel for the rendered output accordingly. Here is an example of R markdown producing a pdf file:

example of R markdown producing a pdf file

If you produce PDF and HTML output, you can see both after splitting the panel.

There is a brief tutorial on R Markdown in the Project Library. To view the sample files, do the following:

  1. Open a project where you want the copied files to be placed.

  2. Open the Files tab.

  3. Click “Library” at upper right.

  4. Select “RMarkdown in CoCalc”.

  5. Click “Get a copy”.

fetching R Markdown intro from the project library

Other Ways

You can also use R in CoCalc via: