R/write_index.R

Defines functions write_index

#' Write `index.Rmd`
#' @noRd
write_index <- function(path) {
  index_yml <- ymlthis::yml_empty() %>%
    ymlthis::yml_title(paste(basename(path),
                             "Report of Statistical Findings", sep = ": ")) %>%
    ymlthis::yml() %>%
    ymlthis::yml_bookdown_site() %>%
    ymlthis::yml_latex_opts(
      documentclass = "report",
      geometry = "margin=1in",
      colorlinks = TRUE,
      lof = TRUE,
      lot = TRUE
    ) %>%
    ymlthis::yml_citations(biblio_style = "apalike", link_citations = TRUE)
  ymlthis::use_index_rmd(
    .yml = index_yml,
    path = path,
    body = "\n# Preface {-}",
    quiet = TRUE,
    open_doc = FALSE
  )
}

Try the rsf package in your browser

Any scripts or data that you put into this service are public.

rsf documentation built on Sept. 16, 2022, 1:06 a.m.