Skip to Content
Modern R Programming Cookbook
book

Modern R Programming Cookbook

by Jaynal Abedin
October 2017
Beginner to intermediate
236 pages
7h 38m
English
Packt Publishing
Content preview from Modern R Programming Cookbook

How it works…

After importing the data into the R environment, the code works as follows:

  1. It takes the entire dataset as an input in the first place. It will work as the input for the function select().
  2. Within the select() function, it only keeps the variables of month and departure delay.
  3. The filter() function takes the output from the select() function and drops those rows that have negative values in the DEP_DELAY variable.

 

  1. The group_by function instructs the summarize() function that the calculation should be grouped by the variable specified into the group_by section.
  2. The summarize() function then calculates the mean departure delay for each month and supplies the output data to the plotting function qplot().
  3. The qplot() function ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

R Cookbook, 2nd Edition

R Cookbook, 2nd Edition

JD Long, Paul Teetor

Publisher Resources

ISBN: 9781787129054Supplemental Content