Closed daricomp closed 4 years ago
The actual implementation saves in the same objet the data manipulation realized with dplyr, while it would be better not to. It also creates two code blocks, when it would be better to have only one. Example follows.
Actual:
diamonds <- diamonds %>% filter(carat < 4)
ggplot(diamonds) + aes(x = carat) + geom_histogram()
Suggestion:
diamonds %>% filter (carat < 4) %>% ggplot () + aes(x = carat) + geom_histogram()
I agree that a plotting tool should not modify original data and %>% syntax would be a better choice.
%>%
Makes sense, implemented in 0.2.3.
0.2.3
Thanks,
Victor
The actual implementation saves in the same objet the data manipulation realized with dplyr, while it would be better not to. It also creates two code blocks, when it would be better to have only one. Example follows.
Actual:
diamonds <- diamonds %>% filter(carat < 4)
ggplot(diamonds) + aes(x = carat) + geom_histogram()
Suggestion:
diamonds %>% filter (carat < 4) %>% ggplot () + aes(x = carat) + geom_histogram()