render_solutions: Render dynamic solutions to R Markdown

View source: R/process_rmd.R

render_solutionsR Documentation

Render dynamic solutions to R Markdown

Description

Create submission-specific solution files based on a generic solution file and task variables.

Usage

render_solutions(
  outfile,
  solfile,
  task_vars = NULL,
  preamble = "",
  open = "{{",
  close = "}}",
  overwrite = FALSE
)

Arguments

outfile

File path of R Markdown output file.

solfile

File path of generic solution file.

task_vars

Named list of tasks, with sublists containing task variables for the corresponding task. Task names should match chunk names in the generic solution file.

preamble

Character vector with lines to be written to the solution before the first task chunk.

open

Open delimiter for task variables.

close

Close delimiter for task variables.

overwrite

Overwrite existing output file.

Details

Task variables are referenced in the solution file embedded between the open and close delimiters.

Value

A character vector containing lines from the solution file, returned invisibly.


dalejbarr/assessr documentation built on Jan. 25, 2024, 10:47 p.m.