[R] text vector clustering

Stefan Th. Gries stgries at gmail.com
Fri Jan 23 17:32:03 CET 2009


On Fri, Jan 23, 2009 at 08:28, Stefan Th. Gries <stgries at gmail.com> wrote:
> Hans-Joerg Bibiko's function Levenshtein would help; cf. below for an
> example (very clumsy with two loops, but you can tweak that with apply
> stuff).

Like this maybe (sorry, should've thought about that earlier):

[...]
x<-rep(all.names, length(all.names))
y<-rep(all.names, each=length(all.names))
sims<-matrix(mapply(levenshtein, x, y), ncol=10)
[...]

STG




More information about the R-help mailing list