Debian Codegraph @

man/rocco.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/rocco.R
3 \name{rocco}
4 \alias{rocco}
5 \title{Knit R Markdown using the classic Docco style}
6 \usage{
7 rocco(input, ...)
8 }
9 \arguments{
10 \item{input}{Path of the input R Markdown file.}
11
12 \item{...}{Arguments to be passed to \code{\link{knit2html}}}
13 }
14 \value{
15 An HTML file is written, and its name is returned.
16 }
17 \description{
18 The classic Docco style is a two-column layout, with text in the left and
19 code in the right column.
20 }
21 \details{
22 The output HTML page supports resizing and hiding/showing the two columns.
23 Move the cursor to the center of the page, and it will change to a
24 bidirectional resize cursor; drag the cursor to resize the two columns. Press
25 the key \code{t} to hide the code column (show the text column only), and
26 press again to hide the text column (show code).
27 }
28 \examples{
29 rocco_view = function(input) {
30 owd = setwd(tempdir())
31 on.exit(setwd(owd))
32 if (!file.exists(input))
33 return()
34 o = rocco(input, quiet = TRUE)
35 if (interactive())
36 browseURL(o)
37 }
38 # knit these two vignettes using the docco style
39 rocco_view(system.file("doc", "docco-classic.Rmd", package = "knitr"))
40 rocco_view(system.file("doc", "knit_expand.Rmd", package = "knitr"))
41 }
42 \references{
43 The Docco package by Jeremy Ashkenas:
44 \url{https://github.com/jashkenas/docco}
45 }
46 \author{
47 Weicheng Zhu and Yihui Xie
48 }