Description Usage Arguments Examples
View source: R/head_and_tail.R
Works just like head()
or tail
but shows both the first and last rows
1 | head_and_tail(df, n = 4L, ntop = n, nbottom = n, nmiddle = 0L)
|
df |
A data frame or data-frame-like object |
n |
A number specifying the number of rows to show at the top and bottom. |
ntop |
Overrides |
nbottom |
Overrides |
nmiddle |
Integer. Whether to show intermediate row to indicate that there are elided rows |
1 2 3 | head_and_tail(mtcars)
mtcars %>% head_and_tail(ntop=2, nbottom=4)
mtcars %>% head_and_tail(nmiddle = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.