]> git.donarmstrong.com Git - cran2deb.git/blob - branch/double_build/R/util.R
initial commit of build all-at-once code.
[cran2deb.git] / branch / double_build / R / util.R
1 iterate <- function(xs,z,fun) {
2     y <- z
3     for (x in xs)
4         y <- fun(y,x)
5     return(y)
6 }
7
8 chomp <- function(x) {
9     # remove leading and trailing spaces
10     return(sub('^[[:space:]]+','',sub('[[:space:]]+$','',x)))
11 }
12
13 err <- function(...) {
14     error(...)
15     exit()
16 }
17
18 exit <- function() {
19     q(save='no')
20 }