Set the path to pandoc.
set_pandoc_path(path = "pandoc")
path
a character giving the location of pandoc (default is "pandoc" which uses the pandoc set in the system path).
"pandoc"