SCM

SCM Repository

[tm] Diff of /trunk/R/textmin/R/textrepo.R
ViewVC logotype

Diff of /trunk/R/textmin/R/textrepo.R

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

revision 52, Sat Aug 12 12:43:39 2006 UTC revision 54, Wed Sep 13 09:08:20 2006 UTC
# Line 9  Line 9 
9                return(tr)                return(tr)
10            })            })
11    
   
12  setMethod("attachData",  setMethod("attachData",
13            c("TextRepository","TextDocCol"),            c("TextRepository","TextDocCol"),
14            function(object, data) {            function(object, data) {
# Line 24  Line 23 
23                names(object@RepresentationMetaData)[length(names(object@RepresentationMetaData))] <- name                names(object@RepresentationMetaData)[length(names(object@RepresentationMetaData))] <- name
24                return(object)                return(object)
25            })            })
26    
27    setMethod("length",
28              signature(x = "TextRepository"),
29              function(x){
30                  return(length(as(x, "list")))
31        })
32    
33    setMethod("show",
34              signature(object = "TextRepository"),
35              function(object){
36                  cat("A text repository with", length(object), "text document collection")
37                  if (length(object) == 1)
38                      cat("\n")
39                  else
40                      cat("s\n")
41        })
42    
43    setMethod("summary",
44              signature(object = "TextRepository"),
45              function(object){
46                  show(object)
47                  if (length(RepresentationMetaData(object)) > 0) {
48                      cat("\nThe representation metadata consists of", length(RepresentationMetaData(object)), "tag-value pair")
49                      if (length(RepresentationMetaData(object)) == 1)
50                          cat(".\n")
51                      else
52                          cat("s.\n")
53                      cat("Available tags are:\n")
54                      cat(names(RepresentationMetaData(object)), "\n")
55                  }
56        })

Legend:
Removed from v.52  
changed lines
  Added in v.54

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