Debian Codegraph @

man/knit_code.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/parser.R
3 \docType{data}
4 \name{knit_code}
5 \alias{knit_code}
6 \title{The code manager to manage code in all chunks}
7 \format{
8 An object of class \code{list} of length 7.
9 }
10 \usage{
11 knit_code
12 }
13 \description{
14 This object provides methods to manage code (as character vectors) in all
15 chunks in \pkg{knitr} source documents. For example,
16 \code{knitr::knit_code$get()} returns a named list of all code chunks (the
17 names are chunk labels), and \code{knitr::knit_code$get('foo')} returns the
18 character vector of the code in the chunk with the label \code{foo}.
19 }
20 \note{
21 The methods on this object include the \code{set()} method (i.e., you
22 could do something like \code{knitr::knit_code$set(foo = "'my precious new
23 code'")}), but we recommend that you do not use this method to modify the
24 content of code chunks, unless you are
25 \href{https://emitanaka.rbind.io/post/knitr-knitr-code/}{as creative as Emi
26 Tanaka} and know what you are doing.
27 }
28 \keyword{datasets}