SCM

SCM Repository

[tm] Diff of /pkg/man/combine.Rd
ViewVC logotype

Diff of /pkg/man/combine.Rd

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

revision 1327, Mon Apr 14 15:35:38 2014 UTC revision 1328, Tue Apr 15 09:46:28 2014 UTC
# Line 1  Line 1 
1  \name{tm_combine}  \name{tm_combine}
2  \alias{c.Corpus}  \alias{c.VCorpus}
3  \alias{c.TextDocument}  \alias{c.TextDocument}
4  \alias{c.TermDocumentMatrix}  \alias{c.TermDocumentMatrix}
5  \alias{c.term_frequency}  \alias{c.term_frequency}
# Line 11  Line 11 
11    single term-document matrix.    single term-document matrix.
12  }  }
13  \usage{  \usage{
14  \method{c}{Corpus}(\dots, recursive = FALSE)  \method{c}{VCorpus}(\dots, recursive = FALSE)
15  \method{c}{TextDocument}(\dots, recursive = FALSE)  \method{c}{TextDocument}(\dots, recursive = FALSE)
16  \method{c}{TermDocumentMatrix}(\dots, recursive = FALSE)  \method{c}{TermDocumentMatrix}(\dots, recursive = FALSE)
17  \method{c}{term_frequency}(\dots, recursive = FALSE)  \method{c}{term_frequency}(\dots, recursive = FALSE)
# Line 19  Line 19 
19  \arguments{  \arguments{
20    \item{\dots}{Corpora, text documents, term-document matrices, or term    \item{\dots}{Corpora, text documents, term-document matrices, or term
21      frequency vectors.}      frequency vectors.}
22    \item{recursive}{Logical. If \code{recursive = TRUE} existing corpus    \item{recursive}{Not used.}
     meta data is also merged, otherwise discarded.}  
 }  
 \details{  
   If \code{recursive = TRUE}, meta data from input objects (corpora or  
   documents) is preserved during concatenation and intelligently merged  
   into the newly created corpus. Although we use a sophisticated merging  
   strategy (by using a binary tree for corpus specific meta data and by  
   joining document level specific meta data in data frames) you should  
   check the newly created meta data for consistency when merging corpora  
   with (partly) identical meta data. However, in most cases the meta  
   data merging strategy will produce validly combined and arranged meta  
   data structures.  
23  }  }
24  \seealso{  \seealso{
25    \code{\link{Corpus}}, \code{\link{TextDocument}},    \code{\link{VCorpus}}, \code{\link{TextDocument}},
26    \code{\link{TermDocumentMatrix}}, and \code{\link{termFreq}}.    \code{\link{TermDocumentMatrix}}, and \code{\link{termFreq}}.
27  }  }
28  \examples{  \examples{
29  data("acq")  data("acq")
30  data("crude")  data("crude")
31    meta(acq, "comment", type = "corpus") <- "Acquisitions"
32    meta(crude, "comment", type = "corpus") <- "Crude oil"
33    meta(acq, "acqLabels") <- 1:50
34    meta(acq, "jointLabels") <- 1:50
35    meta(crude, "crudeLabels") <- letters[1:20]
36    meta(crude, "jointLabels") <- 1:20
37  c(acq, crude)  c(acq, crude)
38    meta(c(acq, crude), type = "corpus")
39    meta(c(acq, crude))
40  c(acq[[30]], crude[[10]])  c(acq[[30]], crude[[10]])
41  c(TermDocumentMatrix(acq), TermDocumentMatrix(crude))  c(TermDocumentMatrix(acq), TermDocumentMatrix(crude))
42  }  }

Legend:
Removed from v.1327  
changed lines
  Added in v.1328

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