Return the middle portion of data similar to head and tail
Details
This function is very simple, and is intended to mimic head()
and tail()
to inspect data without looking at every value
See also
Other jam practical functions:
breakDensity()
,
call_fn_ellipsis()
,
checkLightMode()
,
check_pkg_installed()
,
colNum2excelName()
,
color_dither()
,
exp2signed()
,
getAxisLabel()
,
isFALSEV()
,
isTRUEV()
,
jargs()
,
kable_coloring()
,
lldf()
,
log2signed()
,
minorLogTicks()
,
newestFile()
,
printDebug()
,
reload_rmarkdown_cache()
,
renameColumn()
,
rmInfinite()
,
rmNA()
,
rmNAs()
,
rmNULL()
,
setPrompt()
Examples
x <- 1:101;
middle(x);
#> [1] 1 12 23 34 45 57 68 79 90 101
middle(x, evenly=TRUE)
#> [1] 1 12 23 34 45 57 68 79 90 101
xdf <- data.frame(n=1:101,
excel_colname=jamba::colNum2excelName(1:101));
middle(xdf)
#> n excel_colname
#> 1 1 A
#> 12 12 L
#> 23 23 W
#> 34 34 AH
#> 45 45 AS
#> 57 57 BE
#> 68 68 BP
#> 79 79 CA
#> 90 90 CL
#> 101 101 CW
middle(xdf, evenly=TRUE)
#> n excel_colname
#> 1 1 A
#> 12 12 L
#> 23 23 W
#> 34 34 AH
#> 45 45 AS
#> 57 57 BE
#> 68 68 BP
#> 79 79 CA
#> 90 90 CL
#> 101 101 CW