I asked a related question: check if a program is installed
But am refraining from answering until I've tested the solutions for myself on all three systems. I can get pandoc to work from within R on a windows machine but on linux I get this error/response for each method from the R terminal:
1:
> system('pandoc -v')
sh: 1: pandoc: not found
2:
> myPaths <- c("pandoc",
+ "~/.cabal/bin/pandoc",
+ "~/Library/Haskell/bin/pandoc",
+ "C:\\PROGRA~1\\Pandoc\\bin\\pandoc")
> Sys.which(myPaths)
pandoc ~/.cabal/bin/pandoc
"" "/home/tyler/.cabal/bin/pandoc"
~/Library/Haskell/bin/pandoc C:\\PROGRA~1\\Pandoc\\bin\\pandoc
"" ""
3:
> Sys.which("pandoc")
pandoc
""
You may think I don't have pandoc installed and on the path but I believe I do. From a clean terminal session:
> tyler@trinker ~ $ echo $PATH
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/tyler/.cabal/bin
and
tyler@trinker ~ $ pandoc -v
pandoc 1.10.1
Compiled with citeproc-hs 0.3.7, texmath 0.6.1.3, highlighting-kate 0.5.3.6.
Syntax highlighting is supported for the following languages:
Actionscript, Ada, Alert, Alert_indent, Apache, Asn1, Asp, Awk, Bash,
Bibtex, Boo, C, Changelog, Clojure, Cmake, Coffee, Coldfusion, Commonlisp,
Cpp, Cs, Css, Curry, D, Diff, Djangotemplate, Doxygen, Doxygenlua, Dtd,
Eiffel, Email, Erlang, Fortran, Fsharp, Gnuassembler, Go, Haskell, Haxe,
Html, Ini, Java, Javadoc, Javascript, Json, Jsp, Julia, Latex, Lex,
LiterateCurry, LiterateHaskell, Lua, Makefile, Mandoc, Matlab, Maxima,
Metafont, Mips, Modula2, Modula3, Monobasic, Nasm, Noweb, Objectivec,
Objectivecpp, Ocaml, Octave, Pascal, Perl, Php, Pike, Postscript, Prolog,
Python, R, Relaxngcompact, Rhtml, Ruby, Scala, Scheme, Sci, Sed, Sgml, Sql,
SqlMysql, SqlPostgresql, Tcl, Texinfo, Verilog, Vhdl, Xml, Xorg, Xslt, Xul,
Yacc, Yaml
Copyright (C) 2006-2013 John MacFarlane
Web: http://johnmacfarlane.net/pandoc
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.
How can I make R on Linux Mint recognize pandoc? (I'm newer to Linux)