pandoc_activate {pandoc}R Documentation

Activate a specific Pandoc version to be used

Description

This function will set the specified version as the default version for the session. By default, the default active version in the most recent one among the installed version (nightly version excluded.)

Usage

pandoc_activate(
  version = "latest",
  rmarkdown = getOption("pandoc.activate_rmarkdown", TRUE),
  quiet = FALSE
)

Arguments

version

This can be either:

  • "latest" for the latest release

  • A version number (e.g "2.11.4") for a specific version

  • "nightly" for the last pandoc development built daily

rmarkdown

if TRUE (the default) and rmarkdown is available, this will also set the pandoc version as the default one to use with rmarkdown by calling rmarkdown::find_pandoc(). Default behavior can be changed globally by setting option pandoc.activate_rmarkdown.

quiet

TRUE to suppress messages.

Value

invisibly, the previous active version.

Special behavior in an interactive session

If the version to activate is not yet installed, the user will be prompted to choose to install the version.

Default active version

When the package is loaded, an active version is set to the first Pandoc binary found between:

Examples


# activate version 2.18, including for use with rmarkdown package
pandoc_activate("2.18")

# activate only for this package functions and not rmarkdown
pandoc_activate("2.18", rmarkdown = FALSE)


[Package pandoc version 0.2.0 Index]