Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code not self-contained when piping into esquisser() #234

Open
fkohrt opened this issue Nov 11, 2022 · 0 comments
Open

Code not self-contained when piping into esquisser() #234

fkohrt opened this issue Nov 11, 2022 · 0 comments

Comments

@fkohrt
Copy link

fkohrt commented Nov 11, 2022

When piping e.g. the Titanic dataset as.data.frame() into esquisse::esquisser() and then building some graph (x = Sex, y = Freq, fill = Class), the returned code snipped is not self-contained:

{magrittr} pipe

input

Titanic %>%
  as.data.frame() %>%
  esquisse::esquisser()

output

ggplot(.) +
  aes(x = Sex, y = Freq, fill = Class) +
  geom_col() +
  scale_fill_hue(direction = 1) +
  theme_minimal()

native pipe

input

Titanic |>
  as.data.frame() |>
  esquisse::esquisser()

output

ggplot(`as.data.frame(Titanic)`) +
  aes(x = Sex, y = Freq, fill = Class) +
  geom_col() +
  scale_fill_hue(direction = 1) +
  theme_minimal()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant