#' A function to generate the html report
#'
#' This function generates the html report.
#' @param full_path_2_Rdatafile full path to the Rdatafile
#' @param dir_4_report directory to place the report
#' @param path_2_Rmd_template full path to the html report template
#' @keywords knit html report
#' @return Writes a html report to file
#' @importFrom knitr knit2html
#' @export
#' @examples
#' generate_html_report()
generate_html_report = function(full_path_2_Rdatafile = "GeneratedData.Rdata", dir_4_report = ".", path_2_Rmd_template = system.file("rmarkdown", package="exrender") ){
## load R data file to environment
message("Loading the R data file")
load(full_path_2_Rdatafile)
## knit report
message("knit the report to html")
knit2html(
input = file.path( path_2_Rmd_template, "report_2_knit.R"),
output = paste0(dir_4_report, "Example_Report.html")
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.