RweaveReST: A driver to parse sphinx noweb files with Sweave tool This...

View source: R/RweaveAscii.r

RweaveReSTR Documentation

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

Description

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

RweaveReSTSetup

weaverReSTSetup

weaverReST

Usage

RweaveReST()

RweaveReSTSetup(
  file,
  syntax,
  output = NULL,
  quiet = FALSE,
  debug = FALSE,
  extension = "rst",
  backend = "docutils, sphinx, ...",
  openSchunk = "\n.. code-block:: r\n",
  closeSchunk = "\n\n",
  openSinput = "",
  closeSinput = "",
  openSoutput = "\n\n",
  closeSoutput = "\n",
  indent = "  ",
  openInclude = ".. include::",
  closeInclude = ".rst",
  openFig = ".. figure:: ",
  closeFig = "",
  ...
)

weaverReSTSetup(
  file,
  syntax,
  output = NULL,
  quiet = FALSE,
  debug = FALSE,
  extension = "rst",
  backend = "docutils, sphinx, ...",
  openSchunk = "\n.. code-block:: r\n",
  closeSchunk = "\n\n",
  openSinput = "",
  closeSinput = "",
  openSoutput = "\n\n",
  closeSoutput = "\n",
  indent = "  ",
  openInclude = ".. include::",
  closeInclude = ".rst",
  openFig = ".. figure:: ",
  closeFig = "",
  use.cache = TRUE,
  ...
)

weaverReST()

Arguments

file

file

syntax

syntax

output

output

quiet

quite

debug

debug

...

...

use.cache

use.cache

Value

None value is returned. From a .Rnw noweb file, the corresponding .rst 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, RweaveReST 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 weaverReST driver.

A wrapper for Sweave can be used, named ReST.

Author(s)

David Hajage dhajage@gmail.com

See Also

Sweave, ReST

Examples

  ## Not run: 
ReST("file.Rnw")
  
## End(Not run)


ascii documentation built on May 29, 2024, 6:10 a.m.

Related to RweaveReST in ascii...