Skip to content

Instantly share code, notes, and snippets.

@simecek
Last active January 16, 2021 13:29
Show Gist options
  • Star 29 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save simecek/019d87c55fec3839d95bbf8489dde61d to your computer and use it in GitHub Desktop.
Save simecek/019d87c55fec3839d95bbf8489dde61d to your computer and use it in GitHub Desktop.
How to add R code to your (IPython) Jupyter Notebook
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@raymondben
Copy link

@drwecki, the pipe operator %>% just pushes the first thing into the second, so this code is equivalent to:

gather(df, "Category", "X")

And the gather function takes data from multiple columns and collapses them into key-value pairs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment