R: Convert various input files to various output files using...

knit2pandoc {knitr} | R Documentation

## Convert various input files to various output files using `knit()` and Pandoc

### Description

Knits the input file and compiles to an output format using Pandoc.

### Usage

    knit2pandoc(input, output = NULL, tangle = FALSE, text = NULL, quiet = FALSE,
        envir = parent.frame(), encoding = getOption("encoding"), to = "html",
        pandoc_wrapper = NULL, ...)

### Arguments

`input` | path of the input file
`output` | path of the output file for `knit()`; if `NULL`, this function will try to guess and it will be under the current working directory
`tangle` | whether to tangle the R code from the input file (like `Stangle`)
`text` | a character vector as an alternative way to provide the input file
`quiet` | whether to suppress the progress bar and messages
`envir` | the environment in which the code chunks are to be evaluated (for example, `parent.frame()`, `new.env()`, or `globalenv()`)
`encoding` | the encoding of the input file; see `file`
`to` | a character string describing the Pandoc output format to use
`pandoc_wrapper` | an R function used to call Pandoc; by default, if rmarkdown installed uses `rmarkdown::pandoc_convert()` else `pandoc()`.
`...` | options to be passed to the `pandoc_wrapper` function

### Value

Returns the output of the `pandoc_wrapper` function.

### Author(s)

Trevor L. Davis

[Package knitr version 1.16 Index]