cls.attrib
.cls.attrib(data, clust)
numeric matrix
or data.frame
where columns correspond to variables and rows to
observations.vector
with information about cluster id the object is assigned to.
If vector is not integer type, it will be coerced with warning.list
type which contains three objects with information about:
mean
- numeric vector
which represents mean of given data
,
cluster.center
- numeric matrix
where columns correspond to variables and rows to observations,
cluster.size
- integer vector
with information about size of each cluster.clv.Dis
, wcls.matrix
, bcls.matrix
.# create "data" matrix
mx <- matrix(0,4,2)
mx[2,1] = mx[3,2] = mx[4,1] = mx[4,2] = 1
# give information about cluster assignment
clust = as.integer(c(1,1,2,2))
cls.attrib(mx,clust)
Run the code above in your browser using DataLab