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

Description Usage Arguments Value Author(s)

View source: R/utils-conversion.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
knit2pandoc(
  input,
  output = NULL,
  tangle = FALSE,
  text = NULL,
  quiet = FALSE,
  envir = parent.frame(),
  to = "html",
  pandoc_wrapper = NULL,
  ...,
  encoding = "UTF-8"
)

Arguments

input

Path to the input file.

output

Path to the output file for knit(). If NULL, this function will try to guess a default, which will be under the current working directory.

tangle

Boolean; whether to tangle the R code from the input file (like utils::Stangle).

text

A character vector. This is an alternative way to provide the input file.

quiet

Boolean; suppress the progress bar and messages?

envir

Environment in which code chunks are to be evaluated, for example, parent.frame(), new.env(), or globalenv()).

to

Character string giving the Pandoc output format to use.

pandoc_wrapper

An R function used to call Pandoc. If NULL (the default), rmarkdown::pandoc_convert() will be used if rmarkdown is installed, otherwise pandoc().

...

Options to be passed to the pandoc_wrapper function.

encoding

Ignored (always assumes UTF-8).

Value

Returns the output of the pandoc_wrapper function.

Author(s)

Trevor L. Davis


knitr documentation built on Jan. 27, 2021, 5:09 p.m.