Skip to content

Commit

Permalink
Merge pull request #866 from brshallo/brshallo-implicit-df-replace
Browse files Browse the repository at this point in the history
Remove reliance on implicit df behavior, #819
  • Loading branch information
matthieu-bruneaux authored Nov 15, 2023
2 parents 07a1f17 + b8a5485 commit d026135
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions episodes/13-dplyr.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ data by a certain variable(s), or we even calculate summary statistics. We can
do these operations using the normal base R operations:

```{r}
mean(gapminder[gapminder$continent == "Africa", "gdpPercap"])
mean(gapminder[gapminder$continent == "Americas", "gdpPercap"])
mean(gapminder[gapminder$continent == "Asia", "gdpPercap"])
mean(gapminder$gdpPercap[gapminder$continent == "Africa"])
mean(gapminder$gdpPercap[gapminder$continent == "Americas"])
mean(gapminder$gdpPercap[gapminder$continent == "Asia"])
```

But this isn't very *nice* because there is a fair bit of repetition. Repeating
Expand Down

0 comments on commit d026135

Please sign in to comment.