Main usage of Pandoc is to convert some text from a format into another. This function will do just that:
converting from a file or directly from text
writing to a file or directly to console
Usage
pandoc_convert(
  file = NULL,
  text = NULL,
  from = "markdown",
  to,
  output = NULL,
  standalone = FALSE,
  args = c(),
  version = "default"
)Arguments
- file, text
 One or the other should be provided
- from
 Format to convert from. This must be one of the format supported by Pandoc. Default will be
markdown. This correspond to the--from/-fCLI flag- to
 Format to convert to. This must be one of the format supported by Pandoc. This correspond to the
--to/-tCLI flag.- output
 Pass a path to a file to write the result from Pandoc conversion into a file. This corresponds to the
--output/-oflag- standalone
 Should appropriate header and footer be included ? This corresponds to
--standalone/-sCLI flag- args
 Any other flag supported by Pandoc CLI. See https://pandoc.org/MANUAL.html#options
- version
 Version to use. Default will be the
"default"version. Other possible value areA version number e.g
"2.14.1"The nightly version called
"nightly"The latest installed version with
"latest"Pandoc binary shipped with RStudio IDE with
"rstudio"Pandoc binary found in PATH with
"system"