Skip to content

Instantly share code, notes, and snippets.

View dwhdai's full-sized avatar
:shipit:

David Dai dwhdai

:shipit:
View GitHub Profile
@dwhdai
dwhdai / transpose_multi.R
Created February 15, 2019 16:46
Transposing multiple columns using tidyr
df_wide <- df_long %>%
gather(key, value, -group) %>%
unite(temp, group, key) %>%
spread(temp, value)