Skip to content

Instantly share code, notes, and snippets.

@charlietsai
Last active November 7, 2016 22:09
Show Gist options
  • Save charlietsai/5a2d7a1747c7fe1048795805ef04883a to your computer and use it in GitHub Desktop.
Save charlietsai/5a2d7a1747c7fe1048795805ef04883a to your computer and use it in GitHub Desktop.
Command line script for reformatting R code using formatR
#!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
formatR::tidy_source(args[1], file=args[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment