Session Ready
Exercise

Multidimensional scaling in two dimensions

In this exercise, you will perform multidimensional scaling of state.x77 and plot the resulting object locations in a two dimensional space.

Instructions
100 XP
  • Compute the distance matrix and assign it to an object state.dist.
  • Compute the multidimensional scaling of the data on the distance matrix.
  • Use the ggplot() function to plot the representation of the state.x77 data in two dimensions. Color the state names by their region using the vector state.region.