#' Pretty DataFrames
#'
#' Print DataFrame's in a pretty, compact way using Twitter's Bootstrap framework. By default the first five lines of the supplied, however, more lines can be printed if needed.
#' @param df DataFrame to be printed.
#' @param n The number of lines to be printed. Default=5.
#' @export
pretty_df <- function(df, n=5){
basic_df <- knitr::kable(head(df, n=n))
styled <- kableExtra::kable_styling(basic_df, bootstrap_options = c("striped", "condensed", "responsive"))
return(styled)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.