ggplotgap_data extracts data from a dendrogram object. Make sure to convert hclust object to dendrogram object by calling as.dendrogram().
This method generates an object class gapdata, consisting of a list of data.frames.
The general workflow is as following:
hclust()
hclust output class into dendrogram by calling as.dendrogram()
matrix and dendrogram objects for rows and columns in gapmap() function