Coerce HCPC object to hclust to use library(ape)
<p>I am currently performing hierarchical cluster. I opted to use <code>FactoMineR</code> due to its nice data exploration pipeline: data->MFA->HCPC.</p>

<pre><code>data("wine")
names(wine)
res&lt;-MFA(wine,group = c(2,5,3,10,9,2),type=c("n",rep("s",5)),
         ncp=5,name.group = c("orig","olf","vis","olfag","gust","ens"),
         num.group.sup = c(1,6))

res.hcpc&lt;-HCPC(res, nb.clust=0, consol=F, iter.max=10, min=3, 
           max=NULL, metric="euclidean", method="ward", order=TRUE,
           graph.scale="sqrt-inertia", nb.par=5, graph=TRUE, proba=0.05, 
           cluster.CA="rows",kk=Inf)

#Now for some nice plots
plot(res.hcpc,draw.tree = T,choice = "tree")
plot(res.hcpc,draw.tree = T,choice = "bar")
</code></pre>

<p>These are more than sufficient when wanting to extract answers, but I am looking to present these trees. i.e I want them a bit spruced up through <code>library(ape)</code> - <a href="https://rpubs.com/gaston/dendrograms" rel="nofollow">examples</a></p>

<p>The problem is that these functions require a <code>hclust</code> object. One option I had was to use the <code>MFA</code> results and use an <code>hclust</code> function as: <code>res.hc&lt;-hclust(dist(res$global.pca$ind$coord),method = "ward.D2")</code> to build a <code>hclust</code> object.</p>

<p>This does work, however I find the information that <code>HCPC</code> gives is much more informative (and answers differ from hclust). Thus I want to work with the <code>HCPC</code> object and not <code>hclust</code>, but still be able to use the functions in <code>library(ape)</code>. <strong>Any idea how one would coerce <code>HCPC</code> to <code>hclust</code></strong>?</p>