]> git.donarmstrong.com Git - cran2deb.git/blob - pkg/trunk/R/util.R
35f64139b9e8a9e6dff1fcc1b911eb89b056a77d
[cran2deb.git] / pkg / trunk / 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 host.arch <- function() {
14     # return the host system architecture
15     system('dpkg-architecture -qDEB_HOST_ARCH',intern=T)
16 }
17