Learn R Programming

GrpString (version 0.5.1)

StrKclust: K-means clustering of a group of strings

Description

StrKclust discovers clusters of the strings in a group.

Usage

StrKclust(strings.vec, nclust = 2, nstart = 1)

Value

Returns a data frame with the specific cluster assigned to each string.

A cluster plot is also exported.

Arguments

strings.vec

String Vector.

nclust

Number of clusters. Default is 2.

nstart

Number of random data sets chosen to start. Default is 1.

See Also

StrHclust

Examples

Run this code
# Simple strings
strs3.vec <- c("ABCDdefABCDa", "AC3aABCD", "ACD1AB3", "xYZfgAxZY", "gf56xZYx", "AkfxzYZg")
StrKclust(strs3.vec)

Run the code above in your browser using DataLab