Chapter 11 Pipes

Chapter 11 focuses on pipes and practicing writing code with pipes. This isn’t the first time we’ve heard of pipes, but it has been a while. This is a pipe %>%, pipes can help you simply your coding and save space/time. It takes a bit of getting used to but they are super useful.

11.1 Goals

  • Learn about pipes

  • Using pipes do the following

    • read in data

    • select columns

    • join together files

    • filter out participants

11.2 Tasks

Task 1: Intro to pipes

Complete 11.1 as a walkthrough to using pipes in your code. This will require you to read in a few datasets we haven’t used in a bit. Pay attention to how the pipes are used and how the code chunks are constructed when you use pipes.

Task 2: Read in AQ data

Complete 11.2. Load in the AQ stuff we have loaded in like 4 times.

Task 3: Use Pipes with the AQ

Complete 11.3 through 11.5 using pipes. Give this a real attempt, there are solutions at the end if you get frustrated. I would suggest asking for help via the stackoverlow first though.