Return the middle portion of data similar to head and tail
Return the middle portion of data similar to head and tail
middle(x, n =10, evenly =TRUE,...)
Arguments
x: input data that can be subset
n: numeric number of entries to return
evenly: logical indicating whether to return evenly spaced entries along the full length of x. When evenly=FALSE only the middle n entries are returned.
...: additional arguments are ignored.
Returns
an object of class equivalent to x.
Details
This function is very simple, and is intended to mimic head()
and tail() to inspect data without looking at every value
Examples
x <-1:101;middle(x);middle(x, evenly=TRUE)xdf <- data.frame(n=1:101, excel_colname=jamba::colNum2excelName(1:101));middle(xdf)middle(xdf, evenly=TRUE)