tar_knitr_deps: List literate programming dependencies.

Description Usage Arguments Value See Also Examples

View source: R/tar_knitr_deps.R

Description

List the target dependencies of one or more literate programming reports (R Markdown or knitr).

Usage

1

Arguments

path

Character vector, path to one or more R Markdown or knitr reports.

Value

Character vector of the names of targets that are dependencies of the knitr report.

See Also

Other Literate programming utilities: tar_knitr_deps_expr()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
lines <- c(
  "---",
  "title: report",
  "output_format: html_document",
  "---",
  "",
  "```{r}",
  "targets::tar_load(data1)",
  "targets::tar_read(data2)",
  "```"
)
report <- tempfile()
writeLines(lines, report)
tar_knitr_deps(report)

tarchetypes documentation built on Sept. 21, 2021, 5:10 p.m.