#' Write an markdown summary using knitr
#'
#' Knitr will use the global environment, so your top level objects should be
#' acessible.
#' the result is written to outputdirectory/summary/summary.md
#'
#' @param fg_process the current FASTGenomics Process.
#' @param summary_path the path to the summary to be knitted.
#'
#' @export
#'
#' @return NA
#'
#' @examples
#' fg_process <- Process()
#' everything <- 42
#' write_summary(fg_processs, everything)
write_summary <- function(process, summary_path=""){
if (summary_path == "") {
summary_path <- file.path(process@app@dir, "summary.md")
}
assertthat::is.readable(summary_path)
knitr::knit(summary_path, process@output[[SUMMARY_KEY]]@path, envir = globalenv())
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.