R for absolute beginners: Glossary

Key Points

Before we Start
  • Use RStudio to write and run R programs.

  • Use install.packages() to install packages (libraries).

Introduction to R
  • Access individual values by location using [].

  • Access arbitrary sets of data using [c(...)].

  • Use logical operations and logical vectors to access subsets of data.

Starting with Data
  • Use read_csv to read tabular data in R.

Data Wrangling with dplyr and tidyr
  • Use the dplyr package to manipulate dataframes.

  • Use select() to choose variables from a dataframe.

  • Use filter() to choose data based on values.

  • Use group_by() and summarize() to work with subsets of data.

  • Use mutate() to create new variables.

  • Use the tidyr package to change the layout of dataframes.

  • Use pivot_wider() to go from long to wide format.

  • Use pivot_longer() to go from wide to long format.

A couple of plots. And making our own functions
  • Boxplots are useful for visualizing the distribution of a continuous variable.

  • Barplots are useful for visualizing categorical data.

  • Functions allows you to repeat the same set of operations again and again.

  • Loops allows you to apply the same function to lots of data.

  • Logical tests allow you to apply different calculations on different sets of data.

What is the next step?
  • Practice is important!

  • Working on data that YOU find interesting is a really good idea,

  • The amount of ressources online is immense.

  • KUB Datalab is there for your.


Cheat sheet of functions used in the lessons

Lesson 1 – Introduction to R

Lesson 2 – Starting with Data

Lesson 3 – Data Wrangling with dplyr and tidyr

Lesson 4 – Data Visualization with ggplot2

Lesson 5 – Processing JSON data