SCM

SCM Repository

[tm] Diff of /pkg/R/corpus.R
ViewVC logotype

Diff of /pkg/R/corpus.R

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

revision 696, Fri Jan 5 15:04:53 2007 UTC revision 697, Fri Jan 5 23:09:12 2007 UTC
# Line 348  Line 348 
348            })            })
349    
350  # Update \code{NodeID}s of a DCMetaData tree  # Update \code{NodeID}s of a DCMetaData tree
351  update_id <- function(object) {  update_id <- function(object, id = 0, mapping = NULL, left.mapping = NULL, level = 0) {
     id <<- 0  
     mapping <<- left.mapping <<- NULL  
     level <<- 0  
     return(list(root = set_id(object), left.mapping = left.mapping, right.mapping = mapping))  
 }  
   
352  # Traversal of (binary) DCMetaData tree with setup of \code{NodeID}s  # Traversal of (binary) DCMetaData tree with setup of \code{NodeID}s
353  set_id <- function(object) {  set_id <- function(object) {
354      object@NodeID <- id      object@NodeID <- id
# Line 378  Line 372 
372      return(object)      return(object)
373  }  }
374    
375        return(list(root = set_id(object), left.mapping = left.mapping, right.mapping = mapping))
376    }
377    
378  setMethod("c",  setMethod("c",
379            signature(x = "TextDocCol"),            signature(x = "TextDocCol"),
380            function(x, ..., meta = list(merge_date = Sys.time(), merger = Sys.getenv("LOGNAME")), recursive = TRUE) {            function(x, ..., meta = list(merge_date = Sys.time(), merger = Sys.getenv("LOGNAME")), recursive = TRUE) {

Legend:
Removed from v.696  
changed lines
  Added in v.697

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