Summarizing multivariate data in a single heat map
In the preceding couple of recipes, we looked at representing a matrix of data along two axes on a heat map. In this recipe, we will learn how to summarize multivariate data using a heat map.
Getting ready
We are only using the base graphics functions for this recipe. So, just open up the R prompt and type in the following code. We will use the nba.csv
example dataset for this recipe. So, let's first load it:
nba <- read.csv("nba.csv")
This example dataset, which shows some statistics on the top scorers in NBA basketball games has been taken from a blog post on FlowingData (see http://flowingdata.com/2010/01/21/how-to-make-a-heatmap-a-quick-and-easy-solution/ for details). The original data is from ...
Get R: Data Analysis and Visualization now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.