knitr_expand_content_list: Scrape whisker tags that will be pulled from knitr_expand

Description Usage Arguments Value Examples

Description

Scrape whisker tags that will be pulled from knitr_expand

Usage

1
2
knitr_expand_content_list(file, text = readLines(file, warn = FALSE),
  delim = c("{{", "}}"))

Arguments

file

The template file.

text

Character vector of lines of code. An alternative way to specify the template code directly. If text is provided, file will be ignored.

delim

A pair of opening and closing delimiters for the templating tags.

Value

the tags which will be pulled for expanding a knitr template

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
textRmd <- "
---
title: 'My Report'
---

# {{header_adj}} Header

```{r}
{{whisker_tag1}}
```
"

scriptgloss:::knitr_expand_content_list(text = textRmd)
#> [1] "header_adj"   "whisker_tag1"

dgkf/scriptgloss documentation built on June 8, 2019, 8:43 p.m.