Lab 03: Exploring & Visualizing Data

Lab 03: Exploring & Visualizing Data

Agenda

  1. Tips:

Briefly review a question regarding sorting.
Review numeric vs categorical variable types.

  1. Lab introduction:

Review FiveThirtyEight article on college majors.

Lab Intro

Reminders

  • Start with library(tidyverse) (includes tidyr, readr, dplyr, etc.)
  • Clone using ‘SSH’ link from GitHub
  • Knit to .html & push both .Rmd and .html to GitHub

Tips

  • Be ready to troubleshoot your document, since it will likely fail to knit on multiple occasions throughout the process. Read the error message carefully and take note of which line is preventing a successful knit.

  • Make sure to keep track of your various chunks and to keep text and code in the right place.

  • Remember that your R Markdown file is not aware of your project’s global environment and can only make use of variables, functions, etc. that you have loaded or defined in the document.

  • Remind yourself how the pipe operator (|>) works.

  • If you’re unsure how a function works or what its arguments are, type ? in front of it and hit enter (?read_csv for instance). The “Help” tab will open and provide a summary of the function as well as some examples.