Learn R Programming

flexsiteboard (version 0.0.7)

pandoc_convert: Convert a Pandoc File

Description

Convert a Pandoc File

Usage

pandoc_convert(
  file,
  text = NULL,
  from = pandoc_input_formats(),
  to = pandoc_output_formats()
)

Value

the converted text

Arguments

file

file to read

text

string to use instead of file if set

from

input format

to

output format

Examples

Run this code
if (rmarkdown::pandoc_available()) {
  x <- pandoc_convert(
      text = "\\section{Test}", from = "latex", to = "markdown")
  stopifnot(identical(x, "Test\n====") || identical(x, "# Test"))
}

Run the code above in your browser using DataLab