Skip to content

Commit

Permalink
re-roxygenize
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Jun 9, 2012
1 parent b3b2791 commit 61b1bed
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 22 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ Collate:
'hooks-html.R'
'hooks-md.R'
'hooks-rst.R'
'card.R'
'spin.R'
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ S3method(wrap,source)
S3method(wrap,warning)
export(all_patterns)
export(build_dep)
export(card)
export(eclipse_theme)
export(fig_path)
export(hook_pdfcrop)
Expand Down Expand Up @@ -52,6 +51,7 @@ export(render_sweave)
export(run_chunk)
export(set_header)
export(set_parent)
export(spin)
export(stitch)
export(write_bib)
import(stringr)
Expand Down
34 changes: 15 additions & 19 deletions man/spin.Rd
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
\name{card}
\alias{card}
\title{Convert an R script to a literate programming document}
\name{spin}
\alias{spin}
\title{Spin goat's hair into wool}
\usage{
card(wool, knit = TRUE, format = c("Rmd", "Rnw", "Rhtml", "Rtex", "Rrst"),
spin(hair, knit = TRUE, format = c("Rmd", "Rnw", "Rhtml", "Rtex", "Rrst"),
doc = "^#+'[ ]?")
}
\arguments{
\item{wool}{the path to the R script}
\item{hair}{the path to the R script}
\item{knit}{logical: whether to compile the document
after conversion}
Expand All @@ -31,29 +31,25 @@ card(wool, knit = TRUE, format = c("Rmd", "Rnw", "Rhtml", "Rtex", "Rrst"),
options are written after \code{#+} or \code{#-}.
}
\details{
The function name came from the carding process: carding
breaks open the entangled scoured wool and removes the
burrs and seeds, leaving the wool as a continuous web
called a sliver (thanks to Jenny Hutchison). Obviously
the entangled wool is the original R script, and the
sliver is the literate programming document (ready to be
knitted).
Obviously the goat's hair is the original R script, and
the wool is the literate programming document (ready to
be knitted).
}
\examples{
#' write normal text like this and chunk options like below
# + label, opt=value
(s = system.file("examples", "knitr-card.R", package = "knitr"))
card(s) # default markdown
o = card(s, knit = FALSE) # convert only; do not make a purse yet
(s = system.file("examples", "knitr-spin.R", package = "knitr"))
spin(s) # default markdown
o = spin(s, knit = FALSE) # convert only; do not make a purse yet
knit2html(o) # compile to HTML
# other formats
card(s, FALSE, format = "Rnw") # you need to write documentclass after #'
card(s, FALSE, format = "Rhtml")
card(s, FALSE, format = "Rtex")
card(s, FALSE, format = "Rrst")
spin(s, FALSE, format = "Rnw") # you need to write documentclass after #'
spin(s, FALSE, format = "Rhtml")
spin(s, FALSE, format = "Rtex")
spin(s, FALSE, format = "Rrst")
}
\author{
Yihui Xie, with the original idea from Richard FitzJohn
Expand Down
2 changes: 1 addition & 1 deletion man/stitch.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ stitch(s, system.file("misc", "knitr-template.Rhtml", package = "knitr"))
stitch(s, system.file("misc", "knitr-template.Rmd", package = "knitr"))
}
\seealso{
\code{\link{card}} (turn a specially formatted R script
\code{\link{spin}} (turn a specially formatted R script
to a report)
}

0 comments on commit 61b1bed

Please sign in to comment.