SCM Repository

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

View of /trunk/tm/R/distmeasure.R

Parent Directory Parent Directory | Revision Log Revision Log

Revision 63 - (download) (annotate)
Thu Oct 26 14:59:09 2006 UTC (12 years, 9 months ago) by feinerer
Original Path: trunk/R/textmin/R/distmeasure.R
File size: 755 byte(s)
See ChangeLog.
# Author: Ingo Feinerer

setGeneric("dissimilarity", function(x, y, method) standardGeneric("dissimilarity"))
          signature(x = "TermDocMatrix", y = "ANY", method = "character"),
          function(x, y = NULL, method) {
              # Until factored out in a seperate package
              # use the \code{dists} function from the \pkg{cba} package
              dists(x, y, method)
          c("TextDocument", "TextDocument", "character"),
          function(x, y, method) {
              tdm <- TermDocMatrix(as(list(x,y), "TextDocCol"))
              dissim <- dissimilarity(tdm, method = method)
              class(dissim) <- "dist"
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge