Chapter 6 Performing Effective Data Analysis

“Learning to write programs stretches your mind, and helps you think better, creates a way of thinking about things that I think is helpful in all domains.” —Bill Gates

In the previous chapter, you learned how to load a data set, compute summary statistics, and create visualizations. Suppose instead of just one data set, you had to do analysis on 100 different data sets. Will you have to write 100 times the amount of code? Now suppose that instead of 100 data sets, you have one data set and 100 columns, and you would like to create a visualization of each column. As you’ve seen, different types of data merit different types of visualizations. Will you have to manually examine each column and write the appropriate code to visualize that column? Clearly these scenarios (and many others) would benefit from smarter R programs.

In this Chapter you’ll discover ways to make R do more work and letting you do less. This is where the true power of R as a programming language will be harnessed, and you will be able to write less code and perform more effective analysis. You will also be able to reduce mistakes and increase consistency in analysis, as well as better communicate your work to others. This chapter is where you will gain the skills to move you from being able to work with data to being able to perform effective data analysis. It will all start with basic logic, in the next section!