grep_include: Grep Rmd Source File For Includes

View source: R/deploy.R

grep_includeR Documentation

Grep Rmd Source File For Includes

Description

In a vector containing a Rmd source file, all files which are included are searched and returned in a result vector. What is recognised as include is defined in the search pattern given by the argument ps_grep_pattern.

Usage

grep_include(
  pvec_src,
  ps_grep_pattern,
  pvec_repl_pattern = c("\\(path = ", "\"", "\\)")
)

Arguments

pvec_src

vector containing Rmd source

ps_grep_pattern

pattern that matches the lines with include statments

pvec_repl_pattern

vector of characters that are removed from include statements

Value

vec_result vector with files that are included


charlotte-ngs/rteachtools documentation built on Sept. 21, 2023, 4:20 p.m.