In this section, we will focus on cleaning and manipulating time series data of dataset with the help of the dplyr package. We will observe the following steps to understand the procedure as a whole:
- Include the necessary packages in the workspace mentioned:
> library(lubridate) # work with dates
Attaching package: ‘lubridate’
The following object is masked from ‘package:base’:
date
> library(dplyr) # data manipulation (filter, summarize, mutate)
> library(ggplot2) # graphics
> library(gridExtra) # tile several plots next to each other
Attaching package: ‘gridExtra’
The following object is masked from ‘package:dplyr’:
combine
> library(scales)
Warning message:
package ‘scales’ was built under R version 3.5.3
- Now, in order to manipulate time series data, we will...