write_to_render_post {ready4}R Documentation

Write ready4 model documentation website page from an RMD or Rmarkdown file

Description

write_to_copy_rmds() is used to copy template RMD or Rmarkdown files to specified sub-directories of a model documentation website. These template copies can then be manually edited before being rendered with write_to_render_post().

Usage

write_to_render_post(
  included_dirs_chr,
  path_to_main_dir_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  is_rmd_1L_lgl = TRUE,
  options_chr = c("Y", "N")
)

Arguments

included_dirs_chr

Included directories (a character vector)

path_to_main_dir_1L_chr

Path to main directory (a character vector of length one)

consent_1L_chr

Consent (a character vector of length one), Default: ”

consent_indcs_int

Consent indices (an integer vector), Default: 1

is_rmd_1L_lgl

Is Markdown (a logical vector of length one), Default: TRUE

options_chr

Options (a character vector), Default: c("Y", "N")

Value

No return value, called for side effects.

See Also

rmarkdown::render()

Examples


  # Note, In addition to rmarkdown, the non CRAN package "hugodown" is also required.
  if(requireNamespace("rmarkdown", quietly = TRUE)) {
  # Example 1 - RMD files
  #
  # Copy template RMD files
  write_to_copy_rmds(dir_path_1L_chr = tempdir(),
                     fl_nm_1L_chr = "RMDs",
                     rmds_dir_1L_chr = system.file("MD_RMDs",
                                                   package = "ready4"))
  # Typically you would now edit these templates before proceeding.
  # Render post from RMD files.
  write_to_render_post("RMDs", path_to_main_dir_1L_chr = tempdir())
  #
  # Example 2 - Rmarkdown file
  #
  # Copy template Rmarkdown file
  write_to_copy_rmds(dir_path_1L_chr = tempdir(),
                     fl_nm_1L_chr = "Rmarkdown",
                     rmds_dir_1L_chr = system.file("MD_Rmarkdown",
                                                   package = "ready4"))
  # Typically you would now edit these templates before proceeding.
  # Render post from RMD files.
  write_to_render_post("Rmarkdown",
                       path_to_main_dir_1L_chr = tempdir(),
                       is_rmd_1L_lgl = F)
  }


[Package ready4 version 0.1.9 Index]