Duration: 3:37
Level: Intermediate

In the previous lesson, we introduced R and RStudio and the benefits of trading using the R programming language. In this lesson, we will show you how to install R and RStudio.

Contributed By: QuantInsti

Study Notes:

In the previous lesson, you got a brief introduction to R, RStudio and the benefits of trading using the R programming language. In this lesson, we list down the steps for easy installation of R and RStudio.

In this lesson, you would:

  • Learn to download and install R
  • Learn to download and install RStudio

Windows Users

To install R

  • Open an internet browser and go to www.r-project.org.
  • Click the “download R” link shown in the first paragraph under “Getting Started.
  • Select a CRAN location (a mirror site) and click the corresponding link.
  • Click on the “Download R for Windows” link shown at the top of the page.
  • Click on the “install R for the first time” link shown at the top of the page.
  • Click “Download R 3.4.2 for Windows” and save the executable file on your computer.
  • Run the downloaded .exe file and follow the installation instructions.
  • Now that R is installed, you need to download and install RStudio.

To install RStudio

  • Go to www.rstudio.com and click on the “Download RStudio” button.
  • Click on the “Download” button under RStudio for Desktop.
  • Click on the version recommended for your system, or the latest Windows version, and save the executable file.
  • Run the downloaded .exe file and follow the installation instructions.

Mac Users

To install R

  • Open an internet browser and go to www.r-project.org.
  • Click the “download R” link shown in the first paragraph under “Getting Started.
  • Select a CRAN location (a mirror site) and click the corresponding link.
  • Click on the “Download R for (Mac) OS X” link shown at the top of the page.
  • Click on the file containing the latest version of R under “Files”
  • Save the .pkg file, double-click it to open, and follow the installation instructions.
  • Now that R is installed, you need to download and install RStudio.

To install RStudio

  • Go to www.rstudio.com and click on the “Download RStudio” button.
  • Click on the “Download” button under RStudio for Desktop.
  • Click on the version recommended for your system, or the latest Mac version, and save the .dmg file on your computer.
  • Double-click it to open, and then drag and drop it to your applications folder.

Additional Resources

Frequently Asked Questions on R

Frequently Asked Questions on RStudio

Note – The IBrokers package provides native R access to Interactive Brokers Trader Workstation API


Join the Discussion

Thank you for engaging with IBKR Campus. If you have a general question, it may already be covered in our FAQs. If you have an account-specific question or concern, please reach out to Client Services.

Your email address will not be published. Required fields are marked *

Disclosure: Interactive Brokers

Information posted on IBKR Campus that is provided by third-parties does NOT constitute a recommendation that you should contract for the services of that third party. Third-party participants who contribute to IBKR Campus are independent of Interactive Brokers and Interactive Brokers does not make any representations or warranties concerning the services offered, their past or future performance, or the accuracy of the information provided by the third party. Past performance is no guarantee of future results.

This material is from QuantInsti and is being posted with its permission. The views expressed in this material are solely those of the author and/or QuantInsti and Interactive Brokers is not endorsing or recommending any investment or trading discussed in the material. This material is not and should not be construed as an offer to buy or sell any security. It should not be construed as research or investment advice or a recommendation to buy, sell or hold any security or commodity. This material does not and is not intended to take into account the particular financial conditions, investment objectives or requirements of individual customers. Before acting on this material, you should consider whether it is suitable for your particular circumstances and, as necessary, seek professional advice.

Disclosure: R API Disclosure

This software is in no way affiliated, endorsed, or approved by Interactive Brokers or any of its affiliates. It comes with absolutely no warranty and should not be used in actual trading unless the user can read and understand the source. IBrokers is a pure R implementation of the TWS API.