rmd_check_template {parsermd}R Documentation

Check an Rmd against a template

Description

This function compares the provided Rmd against a template and reports on discrepancies (e.g. missing or unmodified components).

Usage

rmd_check_template(rmd, template, ...)

Arguments

rmd

The rmd to be check, can be an rmd_ast, rmd_tibble, or text that can be handled by parse_rmd.

template

rmd_template object from rmd_template().

...

Unused, for extensibility.

Value

Invisibly returns TRUE if the rmd matches the template, FALSE otherwise.

Examples

tmpl = parse_rmd(system.file("hw01.Rmd", package = "parsermd")) %>%
  rmd_select(by_section(c("Exercise *", "Solution"))) %>%
  rmd_template(keep_content = TRUE)

rmd_check_template(
  system.file("hw01-student.Rmd", package = "parsermd"),
  tmpl
)


[Package parsermd version 0.1.3 Index]