November 9, 2014

Custom build system for compiling rmarkdown files in sublime-text 3

Here is my custom build system for compiling rmarkdown files in sublime-text 3 on Linux.

"cmd": ["R", "-e", "library(knitr);rmarkdown::render(input = '$file',output_file = '$file_base_name.pdf')"],
    "selector": "text.html.markdown",
    "path": "/home/steve/.cabal/bin/:/home/steve/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
}

Obviously you will have to replace the /home/steve parts with your own path which has to include your pandoc installation path, otherwise pandoc will fail when you call it from Sublime Text. Took me a while to figure that out.

Bottom line: now I can write a markdown file in sublime which includes some knitr R chunks, and run it from sublime, without having to switch to rstudio. Very useful.


R reproducibleResearch ubuntu opensource nerdvana


Previous post
Intelligence and context A. Most efforts to construct artificial intelligence are focussed on computation: building a brain with the right program and enough computational
Next post
Custom build system for compiling rmarkdown files in plantuml in sublime-text 3 Here is my custom build system for compiling markdown files including plantuml chunks in sublime-text 3 on Linux. Obviously you will have to replace


This blog by Steve Powell is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License, syndicated on r-bloggers and powered by Blot.
Privacy Policy
.