Seting Up Your Environment

This guide will help you set up your coding environment for FIN5005, with both cloud-based and local options available (you may choose either).

  • You will learn how to use RStudio Cloud for quick, browser-based access and RStudio Desktop for the full set of features on your computer.

  • It is strongly recommended to install the local version (RStudio Desktop) on your computer.

Follow the instructions below to get started.

Estimated reading time: 6 minutes

1 Cloud Solution

Cloud solution means that you don’t need to install anything on your computer. You can run R code directly in your web browser. This is the easiest way to get started without worrying about installation issues.

But soon enough, you will realize that the cloud-based solution is limited in:

  • compute power: 1 CPU core, 1 GB RAM

  • execution hours: 25 hours per month;

  • slow performance

  • AI integration is better in local environment

    GitHub Copilot is a powerful AI tool that offers autocomplete-style suggestions as you code. The tool can give you suggestions based on the code you want to use or by simply inquiring about what you want the code to do.

    It is developed by GitHub in partnership with OpenAI, and it is designated to best assist developers in writing code more efficiently.

    Some of its highlight features include:

    • Code autocompletion: generating suggestions while typing the code.
    • Code generation: Copilot will use the context of the active document to generate suggestions for code that might be useful.
    • Answering questions: it can also be used to ask simple questions while you are coding (e.g., “What is the definition of mean?”).
    • Language support: supports multiple programming languages, including R, Python, SQL, HTML, and JavaScript.

    To enable Copilot in RStudio: click on Tools → Global Options → Copilot → tick the box saying “Enable GitHub Copilot” → sign in to your GitHub account, and there you go; you are ready to start!

    GiHub Copilot free plan has limited usage: 2000 code autocompletions per month, 30 code generations per month, and 30 question answers per month.

    Soon enough, you will realize that you need more than that. Because every character you type counts as usage, regless of whether you accept the suggestion or not.

    🎈 The good news is: You can use Copilot Pro for free if you are a student!

    See Apply to GitHub Education as a student.

    If you wonder anything, look up in GitHub Copilot Documentation.


Nonetheless, here are two popular cloud solutions:

  • Google Colab: good support for Jupyter Notebooks .ipynb.

    We will use Jupyter Notebooks in this course.

  • RStudio Cloud: basic emulator for RStudio IDE in the cloud.

1.1 RStudio Cloud

Once in the dashboard, you can click on the New Project - New RStudio Project to get started:

New Project in RStudio Cloud

Once the new project is created, you will see the RStudio IDE interface, which is similar to the one you would find in RStudio Desktop. You can write and execute R code, create scripts, and manage your projects directly in the cloud.

RStudio Cloud Interface

2 Local Solution

2.1 RStudio Desktop

RStudio Desktop is a free and open-source integrated development environment (IDE) for R. It provides a user-friendly interface for writing and executing R code, making it easier to work with R scripts, data analysis, visualization.

To install RStudio Desktop, follow these steps:

  1. Install R
  2. Install RStudio Desktop

Go to RStudio Desktop Download and download the installer for your operating system (Windows, macOS, or Linux).


ref: