SCM

SCM Repository

[tm] View of /trunk/tm/R/textrepo.R
ViewVC logotype

View of /trunk/tm/R/textrepo.R

Parent Directory Parent Directory | Revision Log Revision Log


Revision 52 - (download) (annotate)
Sat Aug 12 12:43:39 2006 UTC (13 years ago) by feinerer
Original Path: trunk/R/textmin/R/textrepo.R
File size: 1026 byte(s)
Various updates. See ChangeLog and diff source code.
# Author: Ingo Feinerer

setGeneric("TextRepository", function(object, metaname = "created", meta = date()) standardGeneric("TextRepository"))
setMethod("TextRepository",
          c("TextDocCol"),
          function(object, metaname, meta) {
              tr <- new("TextRepository", .Data = list(object), RepresentationMetaData = list(created = meta))
              names(tr@RepresentationMetaData) <- metaname
              return(tr)
          })


setMethod("attachData",
          c("TextRepository","TextDocCol"),
          function(object, data) {
              object@.Data <- as(c(object@.Data, data), "TextRepository")
              return(object)
          })

setMethod("attachMetaData",
          c("TextRepository"),
          function(object, name, metadata) {
              object@RepresentationMetaData <- c(object@RepresentationMetaData, new = list(metadata))
              names(object@RepresentationMetaData)[length(names(object@RepresentationMetaData))] <- name
              return(object)
          })

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