What you need to get started with R. At the same time, it’ll cover a little of how this relates to “programming” in general. Boxes with 📎  have supplemental information and resources.

<aside> 📎 More resources

For a more comprehensive overview of base R (not R studio or any packages), see:

An Introduction to R

Alternatively:

https://www.w3schools.com/r/default.asp

(This website has great free tutorials of a lot of programming languages and paradigms in general!)

Free Edx course on data science in R:

https://www.edx.org/learn/r-programming/harvard-university-data-science-r-basics

</aside>

Outline:

R and R Studio

Basics of writing R

Data types, variables, and functions

Numbers

Strings

Boolean

Vectors

Data frames

Variables

Functions

Libraries

Tidyverse

R Markdown

Other skills

Error messages

Google it!

R and R Studio

R is a programming language. That means you write programs using a particular style (syntax) that will be saved as R files and evaluated by the R software. So first thing’s first, this R software needs to be downloaded on your computer.

<aside> 📎 Programming languages are just systems for writing computer programs. It’s not much different than the idea of “software,” maybe just a little more specific. Think about how you can design a slide show in Microsoft Powerpoint or Apple Keynote. Different styles and advantages, same product.

Programming languages often have different syntax, or conventions for writing out the same process. For example, you might be able to write “1 + 1” in one language but have to write “sum(1, 1)” in another.

Different programming languages offer different advantages, depending on what they were designed for. One might run faster but be harder to write/read, and another might be really easy to interpret at the expense of performance.

</aside>

More specifically, R is a programming language designed for data science, meaning it’s good for cleaning, analyzing, and visualizing datasets.