Creating a new variable is one of the most important tasks in data pre-processing. Creating a new variable and getting it attached to the new variable with existing data frame is called mutation in the dplyr framework. The verb mutate() is used to achieve this task. In this recipe, you will create a new variable from an existing data frame using the mutate() verb. Also, you will see the base R counter example using the transform() function.
Using mutate for data processing
Getting ready
The task of this recipe is to create a new indicator variable that indicates whether the flight has more than 30 minutes delay, or not. The USAairlineData2016 dataset will be used for this recipe. The newly created variable should be attached...