R/to_html.R

Defines functions to_html

Documented in to_html

#' A html Function
#'
#' This function allows you to catch R output and export to html.
#' @param
#' @keywords html
#' @export


to_html <- function(x){
    title <- deparse(substitute(x))
    capture.output(x) %>%
        knitr::kable(caption = title, row.names = F, col.names = "") %>%
        Wu::styling() %>%
        kableExtra::column_spec(
                        1
                      , monospace = TRUE
                      , extra_css = "white-space:pre"
                      , include_thead = TRUE
                    )
}
ghowoo/Wu documentation built on June 10, 2022, 3:47 p.m.