Data cleaning, or rather, tidying up the data is the process of transforming raw data into specific consistent data, which includes analysis in a simpler manner. The R programming language includes a set of comprehensive tools that are specifically designed to clean the data in an effective manner. We will focus on cleaning the dataset over here in a specific way.
The following steps are carried out to perform cleaning attributes of datasets or data frames:
- Include the libraries that are required to clean and tidy up the dataset as follows:
> library(dplyr)
> library(tidyr)
- Analyze the summary of our dataset as shown here, which will help us to focus on which attributes we need to work on:
> summary(GlassDataset)
Id RI Na Mg Al Si
Min. : 1.00 Min. :1.511 Min. :10.73 Min. :0.000 Min. :0.290 Min. :69.81
1st Qu.: 54.25 1st Qu.:1.517 1st Qu.:12.91 1st...