Last Part of an Object

Description

Returns the last elements of a vector, last rows of a matrix, etc.

Usage

tail(x, ...)
tail.default(x, n=6)
tail.data.frame(x, n=6)

Arguments

x an object
n size for the resulting object, number of elements for a vector, components for a list, rows for a matrix or data frame, lines for a function.

Details

For matrices and data frames, the last `n' rows are returned. For functions, the last few lines of the deparsed function are returned as character strings.

Value

an object (usually) like x but generally smaller.

Author

Patrick Burns

See Also

head, corner.

Examples

data(freeny) # R command, not for S-PLUS
tail(freeny.x, n=10)
tail(freeny.y)