Estou fazendo o filtro no df
gapminder
, gerando um df
vazio quando utilizo a variável gdpPercap
:
library(gapminder) # versão 0.2.0
library(dplyr) # versão 0.7.2
gapminder %>%
filter(year == 2007, gdpPercap==max(gdpPercap))
# A tibble: 0 x 6
# ... with 6 variables: country <fctr>, continent <fctr>, year <int>, lifeExp <dbl>, pop <int>, gdpPercap <dbl>
Se eu altero a variável da consulta, aparece o resultado esperado
gapminder %>%
filter(year == 2007, pop==max(pop))
# A tibble: 1 x 6
# country continent year lifeExp pop gdpPercap
#1 China Asia 2007 72.961 1318683096 4959.115
Seria um bug do dplyr
? Estou usando RStudio (Version 1.0.143) e MRO (3.3.3).