From your output of echo $PATH, it appears that you added /anaconda2/bin to PATH in something like .bash_profile, which usually won't be recognized by RStudio or R. A couple of possible solutions:
-
Symlink (i.e.,
ln -s)pandocandpandoc-citeprocto a common path inPATH, such as/usr/local/bin. This path should be recognized by all packages in your system. Personally I haven't succeeded in tweakingPATHin.Renviron(and I don't really know how R handles this file; I feel it is different with.bash_profile). -
Add
/anaconda2/binto thePATHvariable in a way that R can recognize, e.g. doSys.setenv(PATH = ...)in your.Rprofile. -
The RStudio Preview version has actually bundled Pandoc 2.x: https://www.rstudio.com/products/rstudio/download/preview/