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

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

dotchart

dotchart

- [Instructor] R comes with a great collection of built-in graphing tools. One of them is called Dot chart, and it's a great way to look at vectors or matrix-es. Dot chart doesn't necessarily work all that well with data frames, so let me show ya how to use it with vectors and then with a matrix. First, I've created a vector called vectorToPlot, and then I've attached names to it. So I now have a named vector. It's called vectorToPlot, and let's take a look at it. You'll see that the top row is actually the name of the vlaues. So the values are one, two, three, four, five, six, and the names of those values is A, B, C, D, E, and F. With that named vector, I can create a dot chart. And I type in dotchart and the name of the vector that I'm trying to plot. And I get a very simple dot chart. So on the left-hand side you can see the names and across the bottom you can see the values. And at each position is a small dot. I can make this a bit more sophisticated by grouping these together…

Contents