I am doing some hierarchical cluster analyses of some ecological data & I am struggling w/the labels, which are numeric and all but meaningless: dendogram w/meaningless labels
Essentially I would like to bind together the two factorial columns in my data to create labels that clarify which data points are what, and I do not understand R's labelling system well enough to understand what I am trying to do.
If seeing my code will help you understand better, then here it is:
nta ##data frame: 32obs, 40 variables -
##$Quadrant factor w/8levels
##$Position factor w/4levels
nta.bc ##bray-curtis dissimilarity matrix of data
nta.hclust ##average-linked cluster object of nta.bc
##attempt to plot w/labels
plot(nta.hclust) +
labels(nta, which = c(nta$Quadrant,nta$Position)) +
rect.hclust(nta.hclust,k=4)
does anyone have any pointers?
You should include sample data using
dput()so that we can illustrate the answer with a sample of your own data. Also provide actual code not comments since the problem may lie in your code. Here is an example using thevarespecdata that is included in packagevegan. The main problem is that you are usingggplot2syntax with base graphics functions. Did you get error messages that you did not include in your question?