title: How do I change the labels of a dendogram using the fviz_dend function from the "factoextra" package in R?
body: <p>I am creating a shiny app that showcases different clustering techniques such as hierarchical and k-means clustering using a cereal dataset as an example. I am using the fviz_dend function from the "factoextra" package to create my dendogram. However, when I do this the dendogram does not show the names of the cereals as the labels, rather it shows the numerical representation instead. Is there a way to change the numerical values to labels? I am attaching below a picture of my current dendogram using the fviz_dend function and a picture of a dendogram I made using the plot function in base R. Note that the dendogram in created by the plot function has the labels of the cereals as I need them (what I am trying to achieve).  </p>
  
  <p>Dendogram Created Using fviz_dend:</p>
  
  <p><a href="https://i.stack.imgur.com/fPyZd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fPyZd.png" alt="Dendogram I want to modify"></a> </p>
  
  <pre><code>### Code for dendogram using fvizdend
  hc &lt;- hclust(dist(scale(xv), method = input$dmeth), method = input$meth)
  
  fviz_dend(hc, k = input$clustgroup, cex = 0.5, k_colors = c("#2E9FDF", "#00AFBB", "#E7B800", "#FC4E07"),
                  color_labels_by_k = T, rect = T, show_labels = T)  
  </code></pre>
  
  <p>Dendogram Created Using plot function:</p>
  
  <p><a href="https://i.stack.imgur.com/ZidQ4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZidQ4.png" alt="enter image description here"></a></p>
  
  <pre><code>hc &lt;- hclust(dist(scale(xv), method = input$dmeth), method = input$meth)
  plot(hc, labels = xv$Brand)
  </code></pre>