课程: R for Data Science: Lunch Break Lessons

免费学习该课程!

今天就开通帐号,24,100 门业界名师课程任您挑!

stemplot

stemplot

- [Instructor] When you're exploring data, quick is better. You want to take a quick snapshot of data just to kind of get a feel for what this stuff looks like. And R provides the command stem to produce stem and leaf plots which are for exactly this purpose. Let's do a demonstration. First I've created a vector called sample one and into sample one just between you and me, we're going to place a normal curve. This is also known as a bell curve. And let's take a look at those values in sample one. So I can type in sample one and I'm looking at a group of numbers that don't make any sense to me visually whatsoever. So I would like to have some idea of how these numbers distribute. And here's where stem and leaf plots come in. To create a stem and leaf plot in R, you use stem followed by the name of the vector that you'd like to take a look at, in this case sample one. And in return what I get is this very simple table. Now the way to read this table is first of all the decimal point is…

内容