R/helper-head_tail.R

Defines functions head_tail

# =============================================================================
head_tail <- function(x, top = 4, bottom = 4, sep = "...") {

  x <- dplyr::mutate_all(as.data.frame(x), as.character)
  h <- head(x, top)
  t <- tail(x, bottom)

  dots  <- rep(sep, ncol(x))
  space <- rep(" ", ncol(x))
  rbind(h, `...` = dots, t, `  ` = space)
}
# =============================================================================
GegznaV/manyROC documentation built on Sept. 18, 2020, 10:28 p.m.