Created
February 15, 2019 16:46
-
-
Save dwhdai/62f420fac37f507c5f8e38e07f36a7ff to your computer and use it in GitHub Desktop.
Transposing multiple columns using tidyr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df_wide <- df_long %>% | |
gather(key, value, -group) %>% | |
unite(temp, group, key) %>% | |
spread(temp, value) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment