Overview

Introduction to R, RStudio and project organisation

This week you will start using RStudio to write R code and you will create your first graph! You will learn about data types such as “numerics” and “characters” and object types such as “vectors” and “dataframes”. These are the building blocks for the rest of your R journey. You will also learn about the layout of RStudio and a workflow using scripts and RStudio Projects to keep your work organised.

An organized kitchen with sections labeled 'tools', 'report' and 'files', while a monster in a chef's hat stirs in a bowl labeled 'code.'

Artwork by Horst (2023): “bless this workflow”

Learning objectives

The successful student will be able to:

  • use the R command line as a calculator and to assign variables
  • create and use the basic data types in R
  • find their way around the RStudio windows
  • use an RStudio Project to organise work
  • use a script to run R commands
  • create and customise a barplot
  • search and understand manual pages

Instructions

  1. Prepare

    1. First Steps in RStudio: Either 📖 Read the book OR 📹 Watch two videos
  2. Workshop

    1. 💻 🐈 Coat colour of cats. Type in some data, perform calculations on, and plot it.
  3. Consolidate

    1. 💻 Create a plot

    2. 📖 Read Workflow in RStudio

References

Horst, Allison. 2023. “Data Science Illustrations.” https://allisonhorst.com/allison-horst.