Basics

5.0.1 head() and tail()

  • head() and tail() return the first or last six elements of an atomic vector
x <- 1:10
head(x)
## [1] 1 2 3 4 5 6
tail(x)
## [1]  5  6  7  8  9 10