Mutate Data Using R

Learn how to clean and preprocess data by fixing misspelled values and creating new features using R.

Transformation of data

R is a powerful programming language that provides various tools and functions for transforming data. Data transformation involves manipulating data in a dataset to prepare it for further analysis or to make it more suitable for a particular task or purpose. This lesson covers the various uses of the mutate() function, like making calculations, deriving new columns, and cleaning data.

Optimize incorrect numerical data

Data cleaning is time-consuming and laborious. The mutate() function makes this process smoother for us. It helps us modify, replace, and update data.

Note: Since this lesson aims to teach you how to clean imperfect data, we will use a custom dataset with errors so we can show you how to optimize it.

In the example below, we notice negative price values in the data frame. This is not reasonable because we can’t have a negative price for a product. Therefore, we assume the negative values are mistakenly recorded. So, we convert the ...

Get hands-on with 1400+ tech skills courses.