R/print_emoji.R

Defines functions print_emoji print_emoji.data.frame

Documented in print_emoji print_emoji.data.frame

#' prints a string with emojis
#' @param x a dataframe
#' @param ... arguments passed to \code{\link{print}}
#' @export
print_emoji <- function(x, ...) {
  UseMethod("print_emoji")
}

#' @export
#' @rdname print_emoji
#' @importFrom crayon cyan blue yellow
#' @import emo
#' @examples
#' print_emoji(mtcars)
print_emoji.data.frame <- function(x, ...){
  cat(emo::ji("party_popper"),
      emo::ji("party_popper"),
      cyan("It's almost the weekend!"),
      emo::ji("party_popper"),
      emo::ji("party_popper"), " \n",
      blue("Hope it is restful"), " \n",
      yellow$bgMagenta$bold("Here is your data:"), " \n")

  print.data.frame(x, ...)
}
mariumtapal/testpackage documentation built on Nov. 14, 2019, 12:14 a.m.