From the course: R for Data Science: Lunch Break Lessons

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Clustering with hclust

Clustering with hclust

- [Instructor] In the last couple of weeks, we've talked about clustering and in particular partitioning This week, we're going to talk about some more clustering. Only this time we're going to use a hierarchical method and these methods are characteristic because they produce, dendrograms. Let's start with the built-in called H-clust, and let's set up a sample. We'll call it sample quakes. You can see that up in the code window. And what I've done is selected five random lines from the quakes dataset of the full quakes data set is a thousand lines. Let's go ahead and use that to produce a simple hierarchal cluster. So run that line to produce sample quakes, and you can see that it appears in the upper right-hand corner. And we can take a look at that data and see that it contains latitude, longitude, the depth, magnitude, and stations. These are earthquakes that have appeared near Fiji. And again, you can see…

Contents