Book Image

Hands-On Exploratory Data Analysis with R

By : Radhika Datar, Harish Garg
Book Image

Hands-On Exploratory Data Analysis with R

By: Radhika Datar, Harish Garg

Overview of this book

Hands-On Exploratory Data Analysis with R will help you build a strong foundation in data analysis and get well-versed with elementary ways to analyze data. You will learn how to understand your data and summarize its characteristics. You'll also study the structure of your data, and you'll explore graphical and numerical techniques using the R language. This book covers the entire exploratory data analysis (EDA) process—data collection, generating statistics, distribution, and invalidating the hypothesis. As you progress through the book, you will set up a data analysis environment with tools such as ggplot2, knitr, and R Markdown, using DOE Scatter Plot and SML2010 for multifactor, optimization, and regression data problems. By the end of this book, you will be able to successfully carry out a preliminary investigation on any dataset, uncover hidden insights, and present your results in a business context.
Table of Contents (17 chapters)
Free Chapter
1
Section 1: Setting Up Data Analysis Environment
7
Section 2: Univariate, Time Series, and Multivariate Data
11
Section 3: Multifactor, Optimization, and Regression Data Problems
14
Section 4: Conclusions

Cleaning the dataset

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:

  1. Include the libraries that are required to clean and tidy up the dataset as follows:
> library(dplyr)
> library(tidyr)
  1. 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...