RStudio Cloud – The perfect environment to teach R for Data Science

HomeInsightsBlogs | Last Updated August 4, 2021 - by samuel stiyer under data science & analytics

Published onMay 24, 2019

The Problem

Teaching a friend, co-worker, peer, or significant other a new programming language is always a challenging endeavor. In Data Science the challenges can be magnified because many aspiring Data Scientists come from non-programming/non-computer science backgrounds. My own educational background had no formal programming or computer science training; instead my master’s degree is in applied economics, but don’t let the applied fool you, my program was more statistics/theory heavy than practical programming related. For example, the primary tool we used in my program was Stata. If you’ve never heard of it, don’t feel bad – it’s almost exclusively used in higher educational or policy settings. My background made the first step of setting up my computer environment for one of the two primary Data Science Programming languages (R or Python) appear daunting. My anecdotal experience is not uncommon among aspiring Data Scientists and it’s an important perspective to keep in mind when training others.

For those who find themselves in a teaching or mentorship role for another individual, will almost assuredly experience some déjà vu, as they find themselves guiding their new trainee through the same steps, they once found difficult. Helping setup your new trainee’s computer environment, using print for the customary “Hello World!”, showing them some important key bindings and features in whatever IDE or editor you’ll be teaching in, and installing the language-specific packages that you will be introducing your trainee to. Commonly, this leads to you peering over the shoulder of the person you are teaching, pointing to where they will be writing their first line of code on their computer monitor or lap top screen. Which will likely include, some small language-specific syntax error, which will lead you to once again, lean over your new trainee’s shoulder to point the error out; we’ve all been there.

When you need to teach a group of people, blockers – even small ones – can become serious bottlenecks to how quickly you can train a group of people. The steps you’d take for a single trainee offline, don’t effectively scale to a group of people; you only have so many appendages to point at a computer monitor after all. In the workplace, your employer may even have offices all over the United States, maybe even all over the world. This can make it exceptionally difficult to get everyone’s computer environment setup correctly. For example, maybe a handful of your trainees are on Macs, of course one person is using Linux – probably Ubuntu, and the vast majority of your trainees use Windows, but wait – half the windows trainees are using Windows 7 and the other half are using Windows 10. Just thinking about trouble shooting everyone’s computer dependencies and making sure all the packages they’ll be working with were installed correctly, would give me a headache and we haven’t even started the actual instructing yet. Ultimately these people are here to learn a new programming language, not why it’s important to always have your computer’s drivers up to date. Thankfully for aspiring Data Scientists & Data Science instructors everywhere, the open source software company RStudio, Inc has you covered for one of the primary Data Science programming languages – R, through their free cloud service aptly named RStudio Cloud.

The Solution

RStudio Cloud allows you to circumvent all the steps surrounding setting up and troubleshooting all your trainee’s computer environments by handling all the technical setup on RStudio’s end. As of the publishing of this blog post, RStudio Cloud’s features are completely free after sign up.

RStudio Cloud - the Perfect Environment to Teach Rhover-icon

Once you’ve logged in you’ll be redirected into what RStudio Cloud calls your “Personal Workspace”, where you’ll be presented with the following interface at the center of your screen:

RStudio Cloud - the Perfect Environment to Teach Rhover-icon

When you click “New Project” you will initiate the deployment of your setup descriptively named “Untitled Project”. Once deployment is complete, a fresh, fully functional, RStudio Linux environment will open directly in your browser to serve as the sand box for your new project.

RStudio Cloud - the Perfect Environment to Teach Rhover-icon

RStudio Cloud - the Perfect Environment to Teach Rhover-icon

From here you can easily install all your favorite R packages for you to access on essentially any device if you have internet access.

RStudio Cloud - the Perfect Environment to Teach Rhover-icon

Setting up a shared environment and project is just as easy. It’s recommended to set up a shared environment within a new space, for context – a space is a location for your projects, where you can share access with whomever you deem be permitted. For instance, you may make a space for friends and a space for co-workers so that the projects/users within each unique space will remain mutually exclusive. In other words, you won’t have to worry about your co-workers accessing your friend’s space, or your friends accessing your co-worker’s space unless you’ve explicitly added them to both spaces.

To create a new space you simply have to click the “+ New Space” widget located within side bar menu on the left hand side of the website and give it whatever name you want. In the image below you’ll see the side bar menu I am referencing as well as the “New Space” creation UI, where I’ve named my new space – “Example Training Space”. After that you’ll see your new space appear on the sidebar along with “Your Workspace”. You also likely noticed all the other options located in the side menu which I highly recommend exploring, especially the: Guide, Primers, and Cheat Sheets options, which provide all kinds of great resources for both RStudio Cloud and programing with R.

RStudio Cloud - the Perfect Environment to Teach Rhover-icon

Once you go into your new space, you’ll notice that the “Untitled Project” you made earlier – if you’ve been following along with the steps in this post, is not in your newly created space. So in your new training space, lets go ahead and click “New Project” again to setup the environment you want to use for training, I named mine “Training-Project”. Identically to before, once the project is deployed and opened, another brand new RStudio environment will be available to mold into your desired training setup. Before making your project sharable with your trainees, install all the packages you will be utilizing. Also, go ahead and setup all your training material. To do this you can create it in your RStudio Cloud project from scratch, clone a git repo, upload a zip file (which is unzipped on upload), or upload everything 1 at a time; it’s up to you!

RStudio Cloud - the Perfect Environment to Teach Rhover-icon

RStudio Cloud - the Perfect Environment to Teach Rhover-icon

After you’ve installed everything and have the material you initially want to share in your RStudio Cloud training project, click on the project settings menu and click the “Make this project an assignment” box. Once your project is an assignment, anytime one of your trainees “Starts” your assignment it will create a “Derived” version of your entire project, which makes an exact replica of your entire setup: files, code, and packages, all included. The only thing you’ll need to help your trainee’s setup is any of the RStudio IDE Global Setting’s options you recommend your trainees changing. Outside of optional Global Settings changes you may want to introduce, you can go straight to the important part – teaching! Oh and don’t let me forget to mention, all of your trainee’s environments including their work, edits, and experimentation will be completely independent from your original project and from other derived trainee projects in the space. In fact, only you or those you grant permission to will be able to access or view any other trainee’s derived projects besides their own, so no one needs to be afraid of experimenting because of mockery or fear feeling stupid because they are struggling relative to others.

RStudio Cloud - the Perfect Environment to Teach Rhover-icon

Finally, all you have left to do is invite your new trainees! I’m inviting Keith Leslie, a Senior Data Visualization Consultant interested in learning more about R and Morgan DiPietro a new member of the Advanced Analytics team in Atlanta!

RStudio Cloud - the Perfect Environment to Teach Rhover-icon

RStudio Cloud - the Perfect Environment to Teach Rhover-icon

Blog post complete, enjoy your new R training dojo! Shout out to RStudio for making another amazing product!

Samuel Stiyer

Sam Stiyer is a Data Science Consultant at Softcrylic. He is a Machine Learning, R / Python Programming, Big Data & Tidy Data Enthusiast! He loves answering challenging data related questions and learning new things. Connect with him on <a href="https://www.linkedin.com/in/samuel-stiyer/">LinkedIn</a> and <a href="https://twitter.com/SamStiyer">Twitter (@SamStiyer)</a> where he actively discusses applications of Advanced Analytics.

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Not readable? Change text. captcha txt

Start typing and press Enter to search