01. Introduction to R and Setup

Welcome to our R tutorial! Here, we will assume little to no programming language, and go through the R language step-by-step, in an easy-to-understand fashion. We will also be using RStudio, which should help boost your productivity.

If you ever get caught up in any step, please comment below and we will do our best to respond within 24 hours!

What is R?

R is a statistical programming language, based on an older language S, with added semantics. It was created by Ross Ihaka and Robert Gentleman from the University of Auckland, New Zealand. The R Project is maintained and developed by a group of dedicated volunteers across the world.

Ross Ihaka and Robert Gentleman, the creators of R.
Ross Ihaka and Robert Gentleman, the creators of R.

In more technical terms, R is a functional programming language, meaning it models computations as the evaluation of expressions. This means that rather than writing loops that iterate over a set of data, we can write code in the form of functions that efficiently processes data. Besides simple data manipulation, R is also used for calculations, simulations, and graphical displays.

In addition to being functional, R also has object-oriented features, meaning that it stores data in objects. For example, results of a statistical analyses are stored in a "results" object.

Who uses R?

R is used by a variety of people who mainly work in data analyst and statistics. Companies include Bank of America, Google, John Deere, Ford Motor Company, OK Cupid, and UBER.

Companies that user R.
Companies that user R for data analaysis

Why use R?

Besides being free, R is continually being updated and developed by enthusiastic volunteers. Additionally, users like yourself develop scripts and packages in R, then make it available for everyone else. As a result of this, there exists a plenthora of specialized software packages that you can download and use - free of charge. This allows you to worry less about statistics, and focus your concerns on interpreting meaningful results.

Additionally, R has great features such as amazing graphics capabilities which allow for some pretty neat figures.

What does R look like?

R operates on command line interface. This means that interaction occurs on a terminal, where you input a query, and R outputs some results. This is much like the Linux Command Line if you're familiar with that.


To install R, head over to R Project and download the appropriate files.

Running R

Running R is as simple as typing "R" (or "r") into your terminal (for Mac OS X users) or opening the R.exe executable on Windows. Each line of query contains a > ("greater than") sign input, where most commands are inputted.

Starting up R on the OS X Terminal.
Starting up R on the OS X Terminal.

RStudio, an R IDE

Now, R can be used completely fine by itself, but it's worth installing an Integrated Development Environment (IDE). This helps you manage source editors for writing R scripts, view objects in your global environment, inspect datasets via a dataviewer, and allows you to manage your data ouput. It will boost your productivity immensely!

To install RStudio, head over to their webpage for a free download.

RStudio in action.

Here you can see a file to write your R scripts in, the Console used to input R commands, a viewer for plots and figures, and more!

Take your Linux skills to the next level!

The Linux Command Line

Take your Linux skills to the next level! Try Linux & UNIX

The Linux Command Line takes you from your very first terminal keystrokes to writing full programs in Bash, the most popular Linux shell. Along the way you'll learn the timeless skills handed down by generations of gray-bearded, mouse-shunning gurus: file navigation, environment configuration, command chaining, pattern matching with regular expressions, and more.

$ Check price
39.9539.95Amazon 4.5 logo(274+ reviews)

More Linux & UNIX resources

Become a Bioinformatics Whiz!

Introduction to Bioinformatics Vol. 2

Become a Bioinformatics Whiz! Try Bioinformatics

This is Volume 2 of Bioinformatics Algorithms: An Active Learning Approach. This book presents students with a light-hearted and analogy-filled companion to the author's acclaimed course on Coursera. Each chapter begins with an interesting biological question that further evolves into more and more efficiently solutions of solving it.

$ Check price
49.9949.99Amazon 5 logo(5+ reviews)

More Bioinformatics resources