Modulinos: Difference between revisions

Corrected my old shebangs
(More idiomatic, better use of Leiningen)
(Corrected my old shebangs)
Line 1,410:
A way to check if code is running at "top level" is to check <code>length(sys.frames())</code>. This value will be zero for a file being run with <code>Rscript</code>, the <code>--file=</code> argument, or at the command line, and will be greater than 0 in all other conditions (such as package loading or code being sourced from another file.)
 
<lang R>#!/usr/bin/env Rscript
 
meaningOfLife <- function() {
Line 1,428:
test.R
 
<lang R>#!/usr/bin/env Rscript
 
source("scriptedmain.R")
Anonymous user