how to drop rows in r code example
Example 1: remove rows in r based on row number using dplyr
df %>% slice(2:7)
Example 2: r remove row dataframe
myData[-c(2, 4, 6), ] # remove rows 2, 4, 6
df %>% slice(2:7)
myData[-c(2, 4, 6), ] # remove rows 2, 4, 6