Returns the first elements of a vector, the first rows of matrix, etc.
head(x, ...) head.default(x, n=6) head.data.frame(x, n=6)
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. |
For matrices and data frames, the first`n' rows are returned. For functions, the first lines of the deparsed function are returned as character strings.
an object (usually) like x but generally smaller.
Patrick Burns
data(freeny) # R command, not for S-PLUS head(freeny.x, n=10) head(freeny.y)