SCM

SCM Repository

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

Diff of /pkg/R/doc.R

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

revision 1403, Sat Feb 14 10:03:14 2015 UTC revision 1404, Tue Feb 17 18:04:22 2015 UTC
# Line 10  Line 10 
10      if (!all(unlist(lapply(args, inherits, class(x)))))      if (!all(unlist(lapply(args, inherits, class(x)))))
11          stop("not all arguments are text documents")          stop("not all arguments are text documents")
12    
13      structure(list(content = args,      v <- list(content = args,
14                     meta = CorpusMeta(),                     meta = CorpusMeta(),
15                     dmeta = data.frame(row.names = seq_along(args))),                dmeta = data.frame(row.names = seq_along(args)))
16                class = c("VCorpus", "Corpus"))      class(v) <- c("VCorpus", "Corpus")
17        v
18  }  }
19    
20  PlainTextDocument <-  PlainTextDocument <-
# Line 29  Line 30 
30           meta = NULL,           meta = NULL,
31           class = NULL)           class = NULL)
32  {  {
33      structure(list(content = as.character(x),      p <- list(content = as.character(x),
34                     meta = TextDocumentMeta(author, datetimestamp, description,                     meta = TextDocumentMeta(author, datetimestamp, description,
35                                             heading, id, language, origin, ...,                                             heading, id, language, origin, ...,
36                                             meta = meta)),                                        meta = meta))
37                class = unique(c(class, "PlainTextDocument", "TextDocument")))      class(p) <- unique(c(class, "PlainTextDocument", "TextDocument"))
38        p
39  }  }
40    
41  as.character.PlainTextDocument <-  as.character.PlainTextDocument <-
# Line 75  Line 77 
77           ...,           ...,
78           meta = NULL)           meta = NULL)
79  {  {
80      structure(list(content = x,      d <- list(content = x,
81                     meta = TextDocumentMeta(author, datetimestamp, description,                     meta = TextDocumentMeta(author, datetimestamp, description,
82                                             heading, id, language, origin, ...,                                             heading, id, language, origin, ...,
83                                             meta = meta)),                                        meta = meta))
84                class = c("XMLTextDocument", "TextDocument"))      class(d) <- c("XMLTextDocument", "TextDocument")
85        d
86  }  }
87    
88  as.character.XMLTextDocument <-  as.character.XMLTextDocument <-

Legend:
Removed from v.1403  
changed lines
  Added in v.1404

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