#' Generate preregistration file
#'
#' Creates a html file that contains the hypotheses and planned analyses.
#'
#' @param json_file_name a character vector specifying the file name (and path).
#'
#' @export
#'
prereg_pipeline <- function(json_file_name) {
study <- pipeline(json_file_name)
rmd_template <- system.file("rmarkdown/templates/prereg_report/skeleton",
"skeleton.Rmd", package = "pipeline")
rmd_template <- "prereg_report.Rmd" # must exist in same dir
# add safe filename checks
filename <- paste("prereg_", study$name, '_', Sys.Date(), ".html", sep='')
rmarkdown::render(rmd_template, output_file = filename, output_dir = NULL)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.