Last active
January 16, 2021 13:29
-
-
Save simecek/019d87c55fec3839d95bbf8489dde61d to your computer and use it in GitHub Desktop.
How to add R code to your (IPython) Jupyter Notebook
@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
Can you explain what this piece of code is doing? (also is this part of R magic or is it just part of R). Thanks, I'm just wrapping my head around R magics.
df %>%
gather("Category", "X") %>%