Data Analysis and Visualization with R for Social Scientists


Justin Chun-ting Ho

University of Edinburgh

Create a new project

  1. Under the File menu, click on New project, choose New directory, then New project
  2. Enter a name for this new folder, and choose a convenient location
  3. Click on Create project
  4. Create a new file where we will type our scripts

Interaction with R

  • Type commands directly into the console and press 'Enter'
  • Execute commands directly from the script editor using 'Ctrl' + 'Enter' ('Cmd' + 'Return' for Macs)

Installing additional packages using the packages tab

Exercise

  • Use the install option from the packages tab to install the ‘tidyverse’ package.

Tidyverse

Grammar of Graphics