Installing and Configuring RStudio

Lesson
Materials

R vs RStudio

RStudio is a software you use to write your R programming code in. It has a free and open-source (“Community”) edition, which is the one we will be using for the remainder of this tutorial series. Beginners may find it confusing: didn’t we just installed R in the earlier step? Is RStudio a replacement to R? Is it an upgraded variation of R?

No. R is a programming language. Not dissimilar to how we use English (the language) to write poems, we use R (the language) to compose scripts. We can write English in a plain notepad, but many people find the lack of rich feature-set limiting to their productivity, and so most professionals (poets, authors, songwriters, salesperson) use a powerful, feature-rich Word Processor to help them compose their work.

The same for developers, data scientists and programmers. We could use the Terminal for that, but in this era of high productivity there are an abundant of integrated tools, designed carefully to give us a better developer experience. These tools are affectionally called “IDE” (pronounced “ai-dee-eee”), which stands for Integrated Development Environment. RStudio is an IDE.

Download RStudio

Navigate to RStudio’s Download page, and pick the installer for your OS. For Windows (.exe) and Mac OS (.dmg) users. simply run the installer once it has been downloaded and follow the on-screen instructions to complete the installation.

If you’re using Ubuntu (or other Linux distribution), double-click the .deb file once it has been downloaded. This will open the software center, click the install button and continue with the on-screen instructions.

RStudio 1..2 requires a 64-bit OS

If you’re using a 64-bit OS, the above steps should work for you. You can launch RStudio for the first time to verify that the installation process was successful. Make sure you have installed R first by this point (refer to the earlier Lesson if you haven’t).

RStudio 1.2 onwards require a 64-bit operating system. If you are on a 32 bit system, you have to install an earlier version of RStudio from this page instead. The steps outlined above are generally the same.

Is my computer 32-bit or 64-bit?

  • Windows 10 and 8.1
    • Hit the Start button, go to Settings > System > About
    • At the right, under Device specifications, see System type. x64-based PC means you have a 64-bit system and x86-based means you have a 32-bit system.
  • Windows 7
    • Hit the Start button, right-click Computer and select Properties.
    • Under System, see System type. x64-based PC means you have a 64-bit system and x86-based means you have a 32-bit system.
  • Mac OSX
    • Hit the   icon on the top menu bar, go to About This Mac
    • Under Overview (default), see Processor. Any processor except Intel Core Solo or Intel Core Duo is 64-bit.
  • Linux
    • Launch your Terminal, and type lscpu. Under Architecture, if you see x86_64 you have a 64-bit CPU and if you see x86_32 you have a 32-bit CPU.

Launching RStudio

The easiest way to launch RStudio is by using its desktop icon RStudio app icon, which you’ll likely find in the Program Files folder or Applications folder, depending on your operating system. Double click to launch RStudio, and your IDE will look like this:

If you’ve never done programming, the look of it may be a little intimidating; In the next lesson, we’ll dive into RStudio and study the different functionalities of this IDE.


Optional Video

 

Despite its name (RStudio), RStudio is a very capable IDE for other programming languages (Stan, R, SQL, C/C++, even Python) as well. You may not have heard of them yet, but you will learn about Python in this course. 

You can bookmark this video for the future and come back to it when you're more familiar with RStudio and working with Python: