Learn R Programming

cluscov (version 1.1.0)

dcluspar: Clustering of vector elements

Description

A deterministic clustering device of vector elements into k clusters

Usage

dcluspar(k, vec)

Arguments

k

number of clusters

vec

the vector of real valued elements

Value

clus integer assignment of corresponding elements in vec in up to k clusters

Examples

Run this code
# NOT RUN {
set.seed(2); (v=c(rnorm(4,0,0.5),rnorm(3,3,0.5))[sample(1:7)])
dcluspar(k=2,vec = v)
# }

Run the code above in your browser using DataLab