Getting ready

To use the pipe operator in association with the dplyr functionalities, you need to install the following libraries:

  • magrittr
  • dplyr

During installation of these two libraries, make sure that you also install the necessary dependencies. Here is the code to install the preceding two libraries:

    install.packages(c("magrittr", "dplyr"), dependencies = T)

To learn more about installing R libraries, see the Installing R libraries from various sources recipe, in Chapter 1, Installing and Configuring R and its Libraries.

The dataset for this recipe is the USA domestic airline data. The objective is to summarize the delay time by each month and then visualize the results. Here are the specific variables of interest in this recipe:

  • Month
  • Departure delay

In the original dataset, the departure delay might contain some negative values indicating early departure. First, you have to drop those negative numbers.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset