From c99f39617aad904513129299c1b480c4483eae93 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Tue, 6 Feb 2024 23:24:36 -0600 Subject: [PATCH] roxygenize --- man/partition_chunk.Rd | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/man/partition_chunk.Rd b/man/partition_chunk.Rd index ae80afcf36..638f5a01c0 100644 --- a/man/partition_chunk.Rd +++ b/man/partition_chunk.Rd @@ -6,37 +6,8 @@ \usage{ partition_chunk(engine, code) } -\arguments{ -\item{engine}{The name of the language engine (to determine the appropriate -comment character).} - -\item{code}{A character vector (lines of code).} -} -\value{ -A list with the following items: \describe{\item{\code{options}}{The - parsed options (if any) as a list.} \item{\code{src}}{The part of the input - that contains the options.} \item{\code{code}}{The part of the input that - contains the code.}} -} \description{ -Chunk options can be written in special comments (e.g., after \verb{#|} for R -code chunks) inside a code chunk. This function partitions these options from -the chunk body. -} -\note{ -Chunk options must be written on \emph{continuous} lines (i.e., all - lines must start with the special comment prefix such as \verb{#|}) at the - beginning of the chunk body. -} -\examples{ -# parse yaml-like items -yaml_like = c("#| label: mine", "#| echo: true", "#| fig.width: 8", "#| foo: bar", - "1 + 1") -writeLines(yaml_like) -knitr::partition_chunk("r", yaml_like) - -# parse CSV syntax -csv_like = c("#| mine, echo = TRUE, fig.width = 8, foo = 'bar'", "1 + 1") -writeLines(csv_like) -knitr::partition_chunk("r", csv_like) +This is a wrapper function calling \code{xfun::\link[xfun]{divide_chunk}()} +under the hood. } +\keyword{internal}