dplyr filter first code example
Example 1: remove rows in r based on row number using dplyr
df %>% slice(2:7)
Example 2: dtidyverser get first x rows
# slice()
dt <- dt %>%
slice(1:4)
df %>% slice(2:7)
# slice()
dt <- dt %>%
slice(1:4)