Debian Codegraph @

man/spin_child.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/spin.R
3 \name{spin_child}
4 \alias{spin_child}
5 \title{Spin a child R script}
6 \usage{
7 spin_child(input, format)
8 }
9 \arguments{
10 \item{input}{Filename of the input R script.}
11
12 \item{format}{Passed to \code{format} in \code{spin()}. If not
13 provided, it will be guessed from the current knitting process.}
14 }
15 \value{
16 A character string of the knitted R script.
17 }
18 \description{
19 This function is similar to \code{\link{knit_child}()} but is used in R
20 scripts instead. When the main R script is not called via
21 \code{\link{spin}()}, this function simply executes the child script via
22 \code{\link{sys.source}()}, otherwise it calls \code{\link{spin}()} to spin
23 the child script into a source document, and uses \code{\link{knit_child}()}
24 to compile it. You can call this function in R code, or using the syntax of
25 inline R expressions in \code{\link{spin}()} (e.g.
26 \code{{{knitr::spin_child('script.R')}}}).
27 }