Function

コメント・参照等
  • Latex、HTML、Markdown等のテーブルを作成する関数

FUN = f_create_latex_html_markdown_table.r
function (df, rownames = F, table_attr = "width = '100%' class = 'display compact amccdatatables'", format = "html", escape = F, align = NULL, caption = NULL, needDiv = F, className = "overflow-x", format.args = list(big.mark = ",", drop0trailing = T)) 
{
    library(knitr)
    kable_text <- kable(df, row.names = rownames, format = format, format.args = format.args, table.attr = table_attr, escape = escape, align = align, caption = caption)
    if (needDiv) {
        cat(paste0("\n<div class=\"", className, "\">\n"))
    }
    print(kable_text)
    if (needDiv) {
        cat("\n</div>\n")
    }
}