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.