Created
November 26, 2021 10:02
-
-
Save andreagrioni/f68c933c53855190afcdd192fe38554e to your computer and use it in GitHub Desktop.
Pivot to wider formant summary top table
This file contains 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
# topTable summary from limma | |
table_iv %>% | |
# select target coeffients | |
dplyr::select(dplyr::all_of( c("Var1", targets_coef))) %>% | |
# pivot coefficient to long format | |
tidyr::pivot_longer(!Var1) %>% | |
# separate coefficients into new cols | |
tidyr::separate(name, into=c("ARMCD", "day")) %>% | |
# pivot wider along days/timepoint | |
tidyr::pivot_wider(names_from=day, values_from=value) %>% | |
# remove not significant proteins | |
dplyr::filter(Var1 != "NotSig") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment