The purpose of the document is to give you some hints to get started with the warmup assignment. This assumes you have decided to use Google Colab as your development environment but you want to use it to write R instead of Python. If not, consider the following options:
A more natural way to use Google Colab is to use it to write Python. R works, but some features (such as mapping your Google Drive) are not yet supported:
A more natural way to write R is to use a full development environment like RStudio rather than Google Colab:
Finally, you might be in the wrong place altogether because you want to write Python on your own machine (or the Virtual Lab):
Overview
Google Colab provides a cloud-based version of interactive Python that can also be configured to run the R programming language. The advantage of Colab, like all cloud-based applications, is that you can access it with only a browser; you do not need to install any other software. The disadvantage (perhaps) is that you need a Google (e.g., GMail) account to get started.
Steps
Using Colab for R combines skills covered in other hints for Colab and R (the more natural use cases identified above). As a result, this hint is not stand-alone and assumes you have taken a look at Colab for Python to get the following:
- A Colab session up and running
- Your data uploaded to the
/content
folder on the Google server
Changing the Colab runtime to R
Colab expects Python by default. To have it interpret the R language instead, you have to change the "runtime" from Colab's main menu:

Then select R:

Working with the data in R
As in the RStudio tutorial, your first step is to install the necessary libraries for reading Excel files. Remember you execute a code cell in Colab by hitting the Shift-Enter combination (rather than Control-Enter, as in RStudio):
library(tidyverse)
library(readxl)
And then import the Excel data into a tibble:
dat <- read_excel("VideoGameSalesData.xlsx")
You should have the following files, code, and results:

You can then continue exactly as if you were writing R in RStudio.