R Programming By Example
上QQ阅读APP看书,第一时间看更新

Understanding Votes with Descriptive Statistics

This chapter shows how to perform a descriptive statistics analysis to get a general idea about the data we're dealing with, which is usually the first step in data analysis projects and is a basic ability for data analysts in general. We will learn how to clean and transform data, summarize data in a useful way, find specific observations, create various kinds of plots that provide intuition for the data, use correlations to understand relations among numerical variables, use principal components to find optimal variable combinations, and put everything together into code that is reusable, understandable, and easily modifiable.

Since this is a book about programming with R and not about doing statistics with R, our focus will be on the programming side of things, not the statistical side. Keep that in mind while reading it.

Some of the important topics covered in this chapter are as follows:

  • Cleaning, transforming, and operating on data
  • Creating various kinds of graphs programmatically
  • Performing qualitative analysis with various tools in R
  • Building new variables with Principal Components Analysis
  • Developing modular and flexible code that is easy to work with