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.

sunflower

sunflower

- [Instructor] So you can see that I've created two vectors, one called x position, and one called y position. And this is an xy relationship. These are small vectors, but it's already pretty easy to get lost in how these vectors might relate to each other. And of course with that we should use some sort of a visual tool, like, let's try plots. So I type in P-L-O-T, and then I type x position and y POS, and I hit return. And I get a graph that shows six points. Well, I can immediately see that there's more than six points in this graph. In fact, there are 13, x position and y position length is 13. But my graph is only showing six. I'm missing something. I'm not getting the full story. And to get a better picture of how these two relate I'm going to use something called a sunflower plot, which is a plot that's provided by r. To use sunflower plot the first thing I need to do is create an xy table. So here's how I'll do that, xytabl, and into xytabl I'm going to place an xy table…

Contents