The function all_labels() returns all chunk labels as a character
vector. Optionally, you can specify a series of conditions to filter the
labels. The function `all_rcpp_labels()` is a wrapper function for
all_labels(engine == 'Rcpp').
Arguments
- ...
A vector of R expressions, each of which should return
TRUEorFALSE. The expressions are evaluated using the local chunk options of each code chunk as the environment, which means global chunk options are not considered when evaluating these expressions. For example, if you set the global chunk optionopts_chunk$set(purl = TRUE),all_labels(purl == TRUE)will not return the labels of all code chunks, but will only return the labels of those code chunks that have local chunk optionspurl = TRUE.
Details
For example, suppose the condition expression is engine == 'Rcpp', the
object engine is the local chunk option engine. If an
expression fails to be evaluated (e.g. when a certain object does not exist),
FALSE is returned and the label for this chunk will be filtered out.