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!

Linux for Beginners

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

Linux for Beginners doesn't make any assumptions about your background or knowledge of Linux. You need no prior knowledge to benefit from this book. You will be guided step by step using a logical and systematic approach. As new concepts, commands, or jargon are encountered they are explained in plain language, making it easy for anyone to understand.

$ Check price
24.9924.99Amazon 4.5 logo(101+ reviews)

More Linux & UNIX resources

Learn to be a Pythonista!

Programming Python

Learn to be a Pythonista! Try Python

Programming Python shows in-depth tutorials on the language's number of application domains including: system administration, GUIs, the Web, networking, front-end scripting layers, and more. This book focuses on commonly used tools and libraries to give you a comprehensive understanding of Python’s many roles in practical, real-world programming.

$ Check price
64.9964.99Amazon 4 logo(56+ reviews)

More Python resources