title: Nbclust function in R: requires numeric/complex matrix/vector arguments
body: <p>I am trying to perform hierarchical clustering and I want to use nbclust in order to identify the optimal number of clusters. However, I keep getting the following error:</p>
  
  <blockquote>
    <p>Error in t(jeu) %*% jeu : requires numeric/complex matrix/vector arguments</p>
  </blockquote>
  
  <p>I already produced a dissimilarity matrix and plotted the dendogram. My dataset comprises of 2 numeric variables and 260 observations.</p>
  
  <p>I have tried a couple of solutions suggested in other questions, such asnot including the data in the function and only use the dissimilarity matrix but I get the following error: </p>
  
  <blockquote>
    <p>Data matrix is needed. Only frey, mcclain, cindex, sihouette and dunn can be computed.</p>
  </blockquote>
  
  <p>The code I've been using is the following:</p>
  
  <pre><code>dist.gower &lt;- daisy(mydata, metric = "gower")
  
  aggl.clust.c &lt;- hclust(dist.gower, method = "complete")
  plot(aggl.clust.c,
       main = "Agglomerative, complete linkages")
  
  NbClust(mydata, diss="dist.gower", method= "complete", index="all")
  </code></pre>
  
  <p>The dendrogram is plotted succesfully, but I keep getting this error message:</p>
  
  <blockquote>
    <p>Error in t(jeu) %*% jeu : requires numeric/complex matrix/vector arguments</p>
  </blockquote>