I need to access a function clustIndex of cclust package in R. The protoptype of the function is as follows:
clustIndex ( y, x, index = "all" )
y Object of class "cclust" returned by a clustering algorithm such as kmeans
x Data matrix where columns correspond to variables and rows to observations
index The indexes that are calculated "calinski", "cindex", "db", "hartigan",
"ratkowsky", "scott", "marriot", "ball", "trcovw", "tracew", "friedman",
"rubin", "ssi", "likelihood", and "all" for all the indexes. Abbreviations
of these names are also accepted.
y is the object that is produced from function cclust in the same package, but I have a clustering algorithm coded in Matlab, and want to use this function clustIndex to calculate the indices using the solution produced by the algorithm in matlab.
One way I can think of is to create an object of cclust and fill value of its variable using my solutuion and then use it. Will this be correct/work? Documentation of the package is available here
Any other ideas to use?