Skip to content

Instantly share code, notes, and snippets.

@rosvik
Last active September 24, 2020 15:36
Show Gist options
  • Select an option

  • Save rosvik/f03f30766ccd93afb0336a663e7d66f8 to your computer and use it in GitHub Desktop.

Select an option

Save rosvik/f03f30766ccd93afb0336a663e7d66f8 to your computer and use it in GitHub Desktop.
R markdown render file bash command
#!/bin/bash
#
# R markdown export bash command
# Author: Johannes T. Røsvik
# http://github.com/rosvik
#
# Usage:
# > rmd /path/to/file.rmd
#
echo "Rscript -e 'library(rmarkdown); rmarkdown::render('$1')'"
Rscript -e "library(rmarkdown); rmarkdown::render('$1')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment