headtail | R Documentation |
Applies to both rows and columns, enabling quick inspection during interactive use.
headtail(x, ...) ## S4 method for signature 'data.frame' headtail(x, n = 2L) ## S4 method for signature 'list' headtail(x, n = 2L) ## S4 method for signature 'matrix' headtail(x, n = 2L) ## S4 method for signature 'vector' headtail(x, n = 2L)
x |
Object. |
n |
|
... |
Additional arguments. |
Inspired by the print()
method for DataFrame
class
objects.
Invisible NULL
.
headtail(data.frame)
: Same method as matrix
.
headtail(list)
: Paste collapse to a character(1)
.
headtail(matrix)
: Show first and last rows.
Updated 2021-10-14.
utils::head()
, utils::tail()
.
cat()
.
data(mtcars, package = "datasets") ## data.frame ==== headtail(mtcars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.