课程: R for Data Science: Lunch Break Lessons

免费学习该课程!

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

Excel in R: INDEX

Excel in R: INDEX

- [Instructor] I'm using spreadsheet concepts to learn more about R functions. In this case, let's talk about the spreadsheet function called Index. If you look at cell A10, you'll see the value is equal to six. The formula is Index and I've said use the range from A1 through F6. Notice that that's a table and not just a row or a column. The next number is three, which is the third row. And the next number is two, which is the second column. So if, in fact, you go to the third row and the second column, which is B, and look in B3, you'll see the value six. So all this is saying is what's the value in cell B6? So you're looking now at R code, and anytime we use a spreadsheet, we have to import it, so I'm going to use the readxl package, and in line seven, I'm going to import our sample spreadsheet as a data frame. So I'll run line seven, and you'll notice that in the upper right hand corner, I now have a spreadsheet…

内容