Dplyr:: Mutate() in R

Dplyr() is the data manipulation package in R and is described in detail here.

Problem:

Use of Dplyr mutate() function in R

Solution:

mutate() function can be used to achieve the below functionalities:

1. Add new Variables at the end of the data frame that are functions of existing variables.
2. Remove existing Variables
3. Modify existing Variables

Example:

For this example, we can use the data sets related to flights that departed from NYC in 2013.

Flights

Mutate Code:

Flights_Time
Flights_Speed
Thank You!
0

Leave a Reply

Your email address will not be published. Required fields are marked *