r - Relative system path to miktex and pandoc - Shiny Application packaged as Windows desktop app -


i have packaged shiny application windows desktop app following following tutorial: http://www.r-bloggers.com/deploying-desktop-apps-with-r/

in shiny application provide user generate pdf report using pandoc , miktex. in order work in desktop application, have added following code in runshinyapp.r script.

sys.setenv(path=paste("c:/users/woba/documents/dist/pandoc",sep=";", "c:/users/woba/documents/dist/miktex/miktex/bin/")) 

although works correctly, path relative application can distributed other users without them having change path.

i've tried following - didn't work:

sys.setenv(path=paste("./pandoc",sep=";", "./miktex/miktex/bin/")) 

folder structure following:

dist/  + googlechromeportable  + miktex  + pandoc  + r-portable  + runshinyapp.r  + run.bat 

anybody maybe nows how make path relative? (on windows) me lot!

i managed provide relative path following code in runshinyapp.r script:

miktex = file.path(getwd(), 'miktex/miktex/bin/') pandoc = file.path(getwd(), 'pandoc')  sys.setenv(path=paste(pandoc, sep=";", miktex)) 

just providing answer useful other people in future.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -