How to show the first few lines of a data frame in R

In R, this can be accomplished easily with the head() command:

1
head(data)

We can also customize the number of lines we wish to see like so:

1
head(data, 50)