Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is_code_chunk_header_or_xaringan

Identify spinning code chunk header or xaringan


Description

Wrongly identifies a comment without a preceding line break as a code chunk header. See https://yihui.name/knitr/demo/stitch/#spin-comment-out-texts for details.

Usage

is_code_chunk_header_or_xaringan(pd)

Arguments

pd

A parse table.

Examples

style_text(c(
  "# title",
  "some_code <- function() {}",
  "#+ chunk-label, opt1=value1",
  "call(3, 2, c(3:2))"
))

styler

Non-Invasive Pretty Printing of R Code

v1.4.1
MIT + file LICENSE
Authors
Kirill Müller [aut], Lorenz Walthert [cre, aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.