comment_title: Comment title to chunk code

Description Usage Arguments See Also Examples

View source: R/hook_title_comment.R

Description

Comment title to chunk code

Usage

1
2
3
4
5
6
comment_title(
  options = list(engine = "R"),
  template = "{engine}",
  extra_syntax = character(0L),
  ...
)

Arguments

options

A list of chunk options.

template

A template of title processed by glue::glue(). The processed value is automatically commented out by comment_out().

extra_syntax

A named character vector which defines extra syntax to comment out. Each values should contain %s which is the placeholder to insert x. If definitions collides among comment_syntax and extra_syntax, then the latter has priority.

...

Arguments passed to glue::glue()

See Also

comment_out()

Examples

1
2
3
4
5
6
7
8
9
comment_title(
  options = list(engine = "R"),
  template = "{engine}"
)

comment_title(
  options = list(engine = "css", label = "mystyle"),
  template = "{label}.{engine}"
)

atusy/chunkhooks documentation built on Nov. 30, 2021, 10:32 a.m.