Hello,
I am working with the fpc package to complete some CLARA cluster analysis and am running into an error.
The input data is a list of RefSeq mRNA IDs tab separated with the absolute change they undergo between two biological states.
> head(tt)
GeneID Change
1 NM_001034682 -38.0287
2 XM_582291 -293.0663
3 NM_001083506 -4.3722
4 XM_001787770 -162.9333
5 XM_001787538 -162.9333
6 NM_001075459 -29.3449
Here is how I am trying to get the cluster information:
pamk(tt$Change, krange = 2:10, criterion="multiasw", usepam=FALSE)
Error in summary(silhouette(clustering[ss[[i]]], dx))$avg.width :
$ operator is invalid for atomic vectors
However, when I use the average silhouette width instead of multi average silhouette width it does not return an error. The documentation for the function states that for large data sets you should use multiasw. My data set has ~12,000 points which I presume counts as large, but I get the error.
pamk(tt$Change, krange = 2:10, criterion="asw", usepam=FALSE)
Returns no error.
I have been able to run pamk with multiasw on a different data set with no other issues. Weirdly, the two input files are generated by the same scripts, so they should have no weird formatting issues.
Has anyone worked with the fpc package or know what could be causing this error?
Thanks in advance,
Kristen