Function evaluates connectivity index.
1 2  connectivity(data,clust,neighbour.num, dist="euclidean")
connectivity.diss.mx(diss.mx,clust,neighbour.num)

data 

diss.mx 
square, symetric 
clust 
integer 
neighbour.num 
value which tells how many nearest neighbors for every object should be checked. 
dist 
chosen metric: "euclidean" (default value), "manhattan", "correlation"
(variable enable only in 
For given data and its partitioning connectivity index is computed.
For choosen pattern neighbour.num
nearest neighbours are found and sorted from closest
to most further. Alghorithm checks if those neighbours are
assigned to the same cluster. At the beggining connectivity value is equal 0 and increase
with value:
1/i  when ith nearest neighbour is not assigned to the same cluster, 
0  otherwise. 
Procedure is repeated for all patterns which comming from our data set. All values received for particular pattern are added and creates main connectivity index.
connectivity
returns a connectivity value.
Lukasz Nieweglowski
J. Handl, J. Knowles and D. B. Kell Sumplementary material to computational cluster validation in postgenomic data analysis, http://dbkgroup.org/handl/clustervalidation/supplementary.pdf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  # load and prepare data
library(clv)
data(iris)
iris.data < iris[,1:4]
# cluster data
pam.mod < pam(iris.data,5) # create five clusters
v.pred < as.integer(pam.mod$clustering) # get cluster ids associated to gived data objects
# compute connectivity index using data and its clusterization
conn1 < connectivity(iris.data, v.pred, 10)
conn2 < connectivity(iris.data, v.pred, 10, dist="manhattan")
conn3 < connectivity(iris.data, v.pred, 10, dist="correlation")
# the same using dissimilarity matrix
iris.diss.mx < as.matrix(daisy(iris.data))
conn4 < connectivity.diss.mx(iris.diss.mx, v.pred, 10)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.