Delete n rows at top or bottom of a dataframe in R

Example 1: Delete the first 20 rows of a dataframe

tail(d, -3)

Example 2: Delete the last 20 rows of a dataframe

head(d, -3)