SCM

SCM Repository

[inlinedocs] Diff of /pkg/inlinedocs/R/parsers.R
ViewVC logotype

Diff of /pkg/inlinedocs/R/parsers.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 159, Tue Nov 9 16:42:39 2010 UTC revision 162, Wed Nov 10 09:18:20 2010 UTC
# Line 28  Line 28 
28  ### String without prefixes or newlines.  ### String without prefixes or newlines.
29  }  }
30    
31    forall <- function
32  ### For each object in the package that satisfies the criterion  ### For each object in the package that satisfies the criterion
33  ### checked by subfun, parse source using FUN and return the resulting  ### checked by subfun, parse source using FUN and return the resulting
34  ### documentation list.  ### documentation list.
 forall <- function  
35  (FUN,  (FUN,
36  ### Function to apply to each element in the package.  ### Function to apply to each element in the package.
37   subfun=function(x)TRUE   subfun=function(x)TRUE
# Line 43  Line 43 
43    f <- function(objs,docs,...){    f <- function(objs,docs,...){
44      objs <- objs[sapply(objs,subfun)]      objs <- objs[sapply(objs,subfun)]
45      L <- list()      L <- list()
46        on.exit(cat(sprintf("Parser Function failed on %s\n",N)))
47      for(N in names(docs)){      for(N in names(docs)){
48        o <- objs[[N]]        o <- objs[[N]]
49        L[[N]] <- FUN(src=attr(o,"source"),        L[[N]] <- FUN(src=attr(o,"source"),
50                      name=N,objs=objs,o=o,docs=docs,doc=docs[[N]],...)                      name=N,objs=objs,o=o,docs=docs,doc=docs[[N]],...)
51      }      }
52        on.exit()## remove warning message
53      L      L
54    }    }
55    class(f) <- c("allfun","function")    class(f) <- c("allfun","function")

Legend:
Removed from v.159  
changed lines
  Added in v.162

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge