Hello all,

While preparing for a workshop I was running through the code for the
Reproducible Research with R lessons and I found an odd behavior that I
have not encountered before in the [dplyr tutorial](
https://swcarpentry.github.io/r-novice-gapminder/13-dplyr/).

If I load load ‘gapminder' and ‘dplyr' and then run the first line of code:

`mean(gapminder[gapminder$continent == "Africa", "gdpPercap"])`

Returns:

`[1] NA
Warning message:
In mean.default(gapminder[gapminder$continent == "Africa", "gdpPercap"]) :
  argument is not numeric or logical: returning NA`

If I only load ‘gapminder' the code works properly. I’ve replicated this on
four different machines and am scratching my head as to why this error
occurs when I load ‘dplyr’. Any thoughts?

Chris Hamm
_______________________________________________
Discuss mailing list
[email protected]
http://lists.software-carpentry.org/listinfo/discuss

Reply via email to