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. 17, 2018, 2:15 p.m.