dreamRs / esquisse

RStudio add-in to make plots interactively with ggplot2
https://dreamrs.github.io/esquisse
Other
1.77k stars 229 forks source link

Suggestion: Data manipulation #79

Closed daricomp closed 4 years ago

daricomp commented 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()

GegznaV commented 4 years ago

I agree that a plotting tool should not modify original data and %>% syntax would be a better choice.

pvictor commented 4 years ago

Makes sense, implemented in 0.2.3.

Thanks,

Victor