gusl: (Default)
[personal profile] gusl
doPlots <- TRUE; doPdflatex <- TRUE ##default settings
args <- commandArgs(TRUE)
if (length(args)>0) {
  eval(parse(text=args[1]))
}

The idea is that, since we using R's reflection mechanism, we can change the variables from the command-line.
Rscript fix-multiple.R "doPlots=FALSE; doPdflatex=FALSE"

(You could also theoretically write code that actually does stuff, but that would be strange)

(no subject)

Date: 2010-03-27 09:04 pm (UTC)
From: [identity profile] mcoletti.livejournal.com
Keen! Forwarded to the lab mate. Will definitely think about this for future R scripts.

February 2020

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags