head.tail | R Documentation |
Print the first and last N rows of a dataframe
head.tail(x, n = 6L)
x |
an object |
n |
a single integer. If positive or zero, size for the resulting object: number of elements for a vector (including lists), rows for a matrix or data frame or lines for a function. If negative, all but the n last/first number of elements of x. |
For matrices, 2-dim tables and data frames, returns the first and last n
rows when n >= 0
or all but the last and first n
rows when n < 0
.
An object (usually) like x but generally smaller.
Jason Grafmiller
head
, tail
head.tail(mtcars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.