ABSTRACT

A classic advice from journalism professors is “Don’t tell, show," and it is pretty useful when the user wants to communicate information with data. Visualization is one of the most important ways to explore a data set, and it is an area where R really shines. This chapter answers questions about the user data with a few common visualization types, looks at two platforms for visualization data: base R graphics and ggplot2, and shows easy renaming of columns with dplyr’s rename() function and building ggplot2 graphs layer by layer. summary() returns the highest and lowest points in your data, but not how unusual those points are. Hmisc::describe() gives more statistical information. As with almost every task in R, there are multiple tools for visualizing data. The core R language has a lot of visualization functions, and many R users do sophisticated work with them. In addition, there are external dataviz packages that offer entire frameworks for visualizing data.