-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
R Data Visualization Cookbook
By :
The dendrogram plot in the previous example was all black and white. While making a good presentation, we would like this to be more informative. We would also like our audience to look at the dendrogram and immediately spot clusters and relationships among variables. We will now move a bit away from basic R plots and use a package called dendroextras. A sample dendrogram is as follows:

For creating a plot that is easy to interpret and study, we would use the dendroextras package.
For a better understanding on installing packages in R, please refer to the recipe Installing packages and getting help in R, in Chapter 1, A Simple Guide to R:
install.packages("dendroextras")
library(dendroextras)The dendrogram is constructed using the USArrests data available in R. The dataset consists of four variables (Assault, Murder, Rape, and Percent of Urban Population) in each of 50 states of the USA in 1973. We would...
Change the font size
Change margin width
Change background colour