RweavePandoc: A driver to parse Pandoc noweb files with Sweave tool This...

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/RweaveAscii.r

Description

A driver to parse Pandoc noweb files with Sweave tool This driver parses Pandoc files containing R code and replace pieces of code with their output.

RweavePandocSetup

weaverPandocSetup

weaverPandoc

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
RweavePandoc()

RweavePandocSetup(
  file,
  syntax,
  output = NULL,
  quiet = FALSE,
  debug = FALSE,
  extension = "md",
  backend = "pandoc",
  openSchunk = "~~~~~~{.R}",
  closeSchunk = "\n~~~~~~~~~~~\n\n",
  openSinput = "",
  closeSinput = "",
  openSoutput = "\n",
  closeSoutput = "",
  indent = "",
  openInclude = "",
  closeInclude = "",
  openFig = "![](",
  closeFig = ")",
  ...
)

weaverPandocSetup(
  file,
  syntax,
  output = NULL,
  quiet = FALSE,
  debug = FALSE,
  extension = "md",
  backend = "pandoc",
  openSchunk = "~~~~~~{.R}",
  closeSchunk = "\n~~~~~~~~~~~\n\n",
  openSinput = "",
  closeSinput = "",
  openSoutput = "\n",
  closeSoutput = "",
  indent = "",
  openInclude = "",
  closeInclude = "",
  openFig = "![](",
  closeFig = ")",
  use.cache = TRUE,
  ...
)

weaverPandoc()

Arguments

file

file

syntax

syntax

output

output

quiet

quite

debug

debug

...

...

use.cache

use.cache

stylepath

stylepath

Value

None value is returned. From a .Rnw noweb file, the corresponding .md is produced (as eventuals files for graphs).

Note

In order to work properly, noweb codes have to be located at the beginning of a line (no indentation).

Compare with RweaveLatex driver, RweavePandoc provides one new option : format to choose the format of figure that will be inserted in the final document.

In addition, cache option from weaver package is also available with weaverPandoc driver.

A wrapper for Sweave can be used, named Pandoc.

Author(s)

David Hajage dhajage@gmail.com Matti Pastell matti.pastell@helsinki.fi

See Also

Sweave, Pandoc

Examples

1
2
3
4
  ## Not run: 
Pandoc("file.Rnw")
  
## End(Not run)

ascii documentation built on Sept. 17, 2020, 5:07 p.m.

Related to RweavePandoc in ascii...