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.

Installation

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
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!

System Admin Handbook

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

This book approaches system administration in a practical way and is an invaluable reference for both new administrators and experienced professionals. It details best practices for every facet of system administration, including storage management, network design and administration, email, web hosting, scripting, and much more.

$ Check price
74.9974.99Amazon 4.5 logo(142+ reviews)

More Linux & UNIX resources

Become a Bioinformatics Whiz!

Introduction to Bioinformatics Vol. 1

Become a Bioinformatics Whiz! Try Bioinformatics

If you're looking for a fun and easy entry point into bioinformatics algorithms, this book it just for you! Filled with graphics, and written in a light-hearted and humorous story-telling persona, Bioinformatics Algorithms guides you through the intricacies of the problems faced in biology, and the clever solutions used to solve them.

$ Check price
49.9949.99Amazon 4.5 logo(4+ reviews)

More Bioinformatics resources

Ad