Function

コメント・参照等
  • 結果のサマリーをhtmlマークアップに変換する関数

FUN = f_convert_summary_to_htmlmarkup.r
function (analytical_result, pattern, replacement) 
{
    txt0 <- capture.output(summary(analytical_result), type = "output")
    for (iii in seq(pattern)) {
        txt0 <- gsub(pattern[iii], replacement[iii], txt0)
    }
    txt1 <- gsub("\\s", "&nbsp;", paste0(txt0, collapse = "<br>"))
    txt <- gsub("^<br>|<br>$", "", txt1)
    return(txt)
}