Previous lesson: Programming environments
This lesson is for people who want to get started programming R as quickly as possible using the RStudio Cloud platform with no installation required.
Learning objectives At the end of this lesson, the learner will:
Total video time: 8m 03s
RStudio Cloud is a browser-based cloud installation of RStudio. It does not require any installation or configuration and is free for casual, individual use. Its behavior is nearly identical to a local installation of desktop RStudio, so it is easy to switch at any point. The only downside of RStudio Cloud is that working with files is slightly more complicated than with the desktop version. Files must be uploaded to the server since RStudio Cloud cannot directly access files on your local computer.
To get started, go to https://rstudio.cloud/ and click on the
GET STARTED FOR FREE button (or the
Sign Up link in the upper right). The subsequent page will show you the limitations of the free plan. The free plan has ample resources for this lesson series, so just sign up for the free plan (you can always upgrade or switch to desktop later).
After signing up, go to the login page and sign in with the credentials you created. After you log in, you will be taken to the projects page. If you are a new user, you won’t see any existing projects – click on the
New Project button, then select
New RStudio Project.
There will be a significant delay as the system spins up a cloud server to handle your project. (The delay is similar if you restore an existing project.) Once the project has been deployed, you will see a web interface that looks identical to the RStudio desktop interface.
When you are done working on your project, you can just click on the
Your Workspace link in the breadcrumbs at the upper left of the page. The cloud server for your project will remain in place for a while and you can easily return to it by clicking on its link. However, after some period of inactivity, the server will be shut down and will have to be restored. You don’t need to “save” the project – it will remain in the state in which you left it the next time you come back to it.
If you are using RStudio Cloud on a public computer, you should be sure to log out before closing the browser tab. Otherwise, another user that goes to rstudio.cloud may automatically be logged into your account.
Now that you know how to get started in RStudio Cloud, you can try loading and playing with the example script in the Links section at the top of the page. The following video demonstrates two ways to load an existing script into RStudio.
Filestab in the lower right pane, then selecting
Upload. Leave the Target directory at its default. After selecting your file and clicking OK, you can then use the Open command as demonstrated in the video. Unless you have a strong reason to use this method, it’s probably easier just to use the first method (copy and paste).
Runbutton (or press ctrl and Enter on Windows or command and return on Mac). After a line is run, it will automatically advance to the next line, so you can just click run repeatedly to run the whole script.
The editor pane in the upper left of RStudio opens when you either select
New File from the
File menu, then select
R Script or if you open an existing file.
As you work in the editor pane, suggestions will pop up as you type, as shown in the screenshot above.
Next R lesson: R programming basics
Questions? Contact us