check_option.MarkdownYamlState: Check markdown YAML header option

View source: R/check-rmd.R

check_option.MarkdownYamlStateR Documentation

Check markdown YAML header option

Description

Checks if a yaml header option was specified. If not, generates a feedback message. If yes, zooms in on the YAML header option so you can use check_equal to verify equality.

Usage

## S3 method for class 'MarkdownYamlState'
check_option(state, name,
  not_found_msg = NULL, append = TRUE, ...)

Arguments

state

the state to start from. Should be a state produced by check_yaml.

name

name of the YAML header option to zoom in on. If you want to check a nested option, use c() to chain together the different names.

not_found_msg

If specified, this overrides the automatically generated message in case the option wasn't specified.

append

Whether or not to append the feedback to feedback built in previous states.

...

S3 stuff

Value

A state that zooms in on the YAML header option.


Data-Camp/testwhat documentation built on June 24, 2022, 9:59 p.m.