SCM

SCM Repository

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

Diff of /pkg/man/matrix.Rd

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

revision 1150, Tue Nov 15 15:37:17 2011 UTC revision 1151, Thu Nov 17 14:21:49 2011 UTC
# Line 18  Line 18 
18      matrix or a document-term matrix or a \link[slam:matrix]{simple      matrix or a document-term matrix or a \link[slam:matrix]{simple
19      triplet matrix} (package \pkg{slam}) or a \link[=termFreq]{term      triplet matrix} (package \pkg{slam}) or a \link[=termFreq]{term
20      frequency vector} for the coercing functions.}      frequency vector} for the coercing functions.}
21    \item{control}{a named list of control options. The component    \item{control}{a named list of control options. There are local
22      \code{weighting} must be a weighting function capable of handling a      options which are evaluated for each document and global options
23        which are evaluated once for the constructed matrix. Available local
24        options are documented in \code{\link{termFreq}} and are internally
25        delegated to a \code{\link{termFreq}} call. Available global options
26        are:
27        \describe{
28          \item{\code{bounds}}{A list with a tag \code{global} whose value
29            must be an integer vector of length 2. Terms that appear in less
30            documents than the lower bound \code{bounds$global[1]} or in
31            more documents than the upper bound \code{bounds$global[2]} are
32            discarded. Defaults to \code{list(global = c(1,Inf)} (i.e., every
33            term will be used).}
34          \item{\code{weighting}}{A weighting function capable of handling a
35      \code{TermDocumentMatrix}. It defaults to \code{weightTf} for term      \code{TermDocumentMatrix}. It defaults to \code{weightTf} for term
36      frequency weighting. All other options are delegated internally to a          frequency weighting. Available weighting functions shipped with
37      \code{\link{termFreq}} call.}          the \pkg{tm} package are \code{\link{weightTf}},
38            \code{\link{weightTfIdf}}, \code{\link{weightBin}}, and
39            \code{\link{weightSMART}}.}
40        }}
41    \item{\dots}{the additional argument \code{weighting} (typically a    \item{\dots}{the additional argument \code{weighting} (typically a
42      \code{\link{WeightFunction}}) is allowed when coercing a      \code{\link{WeightFunction}}) is allowed when coercing a
43      simple triplet matrix to a term-document or document-term matrix.}      simple triplet matrix to a term-document or document-term matrix.}
44  }  }
45  \value{  \value{
46    An object of class \code{TermDocumentMatrix} or class    An object of class \code{TermDocumentMatrix} or class
47    \code{DocumentTermMatrix} containing a sparse term-document matrix or    \code{DocumentTermMatrix} (both inheriting from a
48    document-term matrix. The attribute \code{Weighting} contains the    \link[slam:matrix]{simple triplet matrix} in package \pkg{slam})
49    weighting applied to the matrix.    containing a sparse term-document matrix or document-term matrix. The
50  }    attribute \code{Weighting} contains the weighting applied to the
51  \seealso{    matrix.
   The documentation of \code{\link{termFreq}} gives an extensive list of  
   possible options.  
   
   Available weighting functions shipped with the \pkg{tm}  
   package are \code{\link{weightTf}}, \code{\link{weightTfIdf}},  
   \code{\link{weightBin}}, and \code{\link{weightSMART}}.  
52  }  }
53  \examples{  \examples{
54  data("crude")  data("crude")

Legend:
Removed from v.1150  
changed lines
  Added in v.1151

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