library(cacheSweave)

reload <- function(){
    Stangle('paper.Rnw', split=TRUE)
}

chunk <- function(x, y=x, ...){
    for(i in c(x:y)){
        src <- paste('tmp/figure-', formatC(i, flag='0', width=3), '.R', sep='')
        print(src)
        source(src, ...)
    }
}

q <- function (save = "no", status = 0, runLast = TRUE) {
    .Internal(quit(save, status, runLast))
}
