From 3582956805139a0efe7e33cb1d8661e94ffd1943 Mon Sep 17 00:00:00 2001 From: hpolvech <helene.polveche@ens-lyon.fr> Date: Thu, 14 Oct 2021 10:31:55 +0200 Subject: [PATCH] slice_min() --- session_4/session_4.Rmd | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/session_4/session_4.Rmd b/session_4/session_4.Rmd index 66215b7..d60a76a 100644 --- a/session_4/session_4.Rmd +++ b/session_4/session_4.Rmd @@ -602,7 +602,15 @@ Install and load the `ggrepl` package. install.packages("ggrepel") library(ggrepel) ``` + </p> +</details> + +Let s **filter** our table into a new variable, top10, to keep only the top 10 according to the adjusted pvalue. +**Tips :** You can use the [function](https://dplyr.tidyverse.org/reference/slice.html) `slice_min()` +top10 <- tab.sig %>% + filter(sig == TRUE) %>% + slice_min(n = 10, padj) -- GitLab