课程: R for Data Science: Lunch Break Lessons

免费学习该课程!

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

dplyr: joins

dplyr: joins

- [Instructor] In Base R, we use cbind and rbind to combine two data frames. Dplyr gives us the same functionality, but coaches it in terms of the more familiar SQL joins. As a reminder, there are four joins inter join, left join, right join, and full join. And actually there are very many more, but for the sake of this command, we can stop with those four. To use these, I first of all load in the tidy verse which I've done in line four. In lines 12 through 23, I create two data frames for demonstration purposes. Now I'm going to just buzz through there but let's take a quick look at what those data frames look like. I'm going to first of all clear the console then I'm going to click on planet density and that's what this data frame looks like. And then planet distance. You'll notice that both databases have the names of planets. Notice that in Planet density, the order of planets is different than the order of…

内容