Resources

RStudio Cloud | {rscloud} Package | Instructor View

video
Aug 11, 2021
2:57

image: thumbnail.jpg

Transcript#

This transcript was generated automatically and may contain errors.

As R users, we know that sometimes code is the best way to handle things, and in this video walkthrough, we'll be focused on setting up our access to the rscloud package.

Setting up client credentials

To get started using the rscloud package, we first need to set up our client credentials, and we do this from within RStudio Cloud. After logging in to our RStudio Cloud account, we can click on our icon or photo in the top right to access the user panel, and then select Client Credentials. This will take us to a page with any existing credentials we might have. To create new credentials, click on Plus New Credentials in the top right.

This will open a popup where you can name your credentials. After naming your credentials, click OK to see and copy your generated credentials. You will only be shown the credentials once, so do be sure to copy them and store them in a secure place before closing the popup window. Be careful not to share or commit your credentials to Git.

Configuring the R environment

The recommended method for setting your credentials is by editing your R Environ file, and we can do this using the usethis package. From within RStudio Cloud, we can go to a project, and by running usethis, edit renviron in the console. This should then open your R Environ file, where you can paste and save your client credentials before restarting R.

After setting up your credentials in your R Environ file, you can install the development version of the rscloud package by running the following commands in the console. install .packages remote and remotes install github rstudio rscloud Once this is done, you have the rscloud package available and ready to use in RStudio Cloud.

Using the rscloud package

From here, we can do things like run rscloud underscore space underscore list, which will return a table with all of the spaces available within our RStudio Cloud account, and we can use a space underscore id from this table to look at the number of users and projects. For example, when I run rscloud underscore space using the space id 81721, I can see that there are 327 users and 946 projects within this shared workspace.

For example, when I run rscloud underscore space using the space id 81721, I can see that there are 327 users and 946 projects within this shared workspace.

You can learn more about additional functionality of the rscloud package by visiting the package documentation at github.com rstudio rscloud.