title: fviz_cluster() not accepting for k-medoid (PAM) results
body: <p>Trying to visualize k-medoid (PAM) cluster results with <code>fviz_cluster()</code>, however function isn't accepting them.</p>
  <p>It states within <code>?fviz_clust</code> &quot;object argument = an object of class &quot;partition&quot; created by the functions <code>pam()</code>, <code>clara()</code> or <code>fanny()</code> in cluster package&quot;</p>
  <p>I've tried accessing the clustering vector through other means;</p>
  <pre class="lang-r prettyprint-override"><code>pam_gower_2$clustering
  pam_gower_2[[3]]
  
  </code></pre>
  <p>but then I get a separate error:</p>
  <blockquote>
  <p>Error: $ operator is invalid for atomic vectors&quot;</p>
  </blockquote>
  <p>The class of pam_gower_2 is partition? As the argument expects.</p>
  <pre class="lang-r prettyprint-override"><code>class(pam_gower_2)
  &gt; class(pam_gower_2)
  [1] &quot;pam&quot;       &quot;partition&quot;
  </code></pre>
  <p>Here's the code I'm using:</p>
  <pre class="lang-r prettyprint-override"><code>df_gower &lt;- df[, c(2:21)] 
  df_gower &lt;- df_gower[, c(1:4, 11:12, 14:15, 5:10, 16:20)] 
  
  gower_dist &lt;- daisy(df_gower, metric=&quot;gower&quot;, type=list(ordratio=c(2:4, 6), symm=c(7:8), asymm=c(5), logratio=c(13)))
  
  gower_mat &lt;- as.matrix(gower_dist)
  tendency_gower &lt;- get_clust_tendency(gower_mat, 100, graph=T)
  tendency_gower$hopkins_stat
  
  fviz_nbclust(gower_mat, pam, method=&quot;wss&quot;)
  fviz_nbclust(gower_mat, pam, method=&quot;silhouette&quot;)
  
  pam_gower_2 &lt;- pam(gower_mat, k=2, diss=T)
  
  # all of the above functions as expected
  
  fviz_cluster(pam_gower_2, gower_mat)
  </code></pre>
  <p>above line produces the following error:</p>
  <blockquote>
  <p>Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x),
  :'data' must be of a vector type, was 'NULL'</p>
  </blockquote>
  <p>Would greatly appreciate feedback/ fix, reasons as to why this doesn't work, or an alternative method for visualizing.</p>
  <p>Thanks :)</p>