Skip to content

Instantly share code, notes, and snippets.

@njudd
Last active December 9, 2022 16:19
Show Gist options
  • Save njudd/912eec4ce47b0a65f36da06363d8cf8d to your computer and use it in GitHub Desktop.
Save njudd/912eec4ce47b0a65f36da06363d8cf8d to your computer and use it in GitHub Desktop.
Showing how to get out of the R base pipe!
iris |>
(\(.) {head(.)})()
# or an example with plotting
diamonds |> (\(.) {
ggplot(., aes(carat, price)) + geom_point()
}) () #https://stackoverflow.com/questions/73752006/using-the-base-r-pipe-to-pipe-ggplot2-to-plotly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment