[R] fpc package - computing silhouette value returns error
Ziqi Zhang
ziqi.zhang at sheffield.ac.uk
Fri Aug 7 16:40:22 CEST 2015
Hi
I am using R to do clustering and compute a number of cluster
statistics. Below are my code. I do not understand why I get the error:
"Error in summary(silhouette(clustering[ss[[i]]], dx)) : error in
evaluating the argument 'object' in selecting a method for function
'summary': Error in round(x) : non-numeric argument to mathematical
function"
Any suggestsion highly appreciated!
Code:
--------------
library(fpc)
require(graphics)
distance <- dist(USArrests, "euclidean")
hc <-hclust(distance, "average")
distcritmulti(USArrests, hc, criterion="asw", fun="dist",
metric="euclidean")
-------------
--
Ziqi Zhang
Research Associate
Department of Computer Science
University of Sheffield
---
This email has been checked for viruses by Avast antivirus software.
More information about the R-help
mailing list