title: R hierarchical clustering issue with input matrix
body: <p>I am beginner in R. I have graph with 11 vertices. I am trying to make dendrogram with single linkage, but I am getting some strange error. This is my own distance matrix which I created manually. Its matrix 11x11.</p>
  
  <pre><code>mat&lt;-matrix(c(0,1,2,3,3,1,2,2,2,3,2,
            1,0,1,2,2,2,1,2,3,2,3,
            2,1,0,1,1,2,2,1,2,3,3,
            3,2,1,0,1,3,3,2,3,4,4,
            3,2,1,1,0,3,3,2,3,4,4,
            1,2,2,3,3,0,1,1,1,2,1,
            2,1,2,3,3,1,0,1,2,1,2,
            2,2,1,2,2,1,1,0,1,2,2,
            2,3,2,3,3,1,2,1,0,1,1,
            3,2,3,4,4,2,1,2,1,0,1,
            2,3,3,4,4,1,2,2,1,1,0),nrow=11,byrow=TRUE)
  rownames(mat)&lt;-c('v1', 'v2', 'v3', 'v4', 'v5', 'v6', 'v7', 'v8', 'v9', 'v10', 'v11')
  colnames(mat)&lt;-c('v1', 'v2', 'v3', 'v4', 'v5', 'v6', 'v7', 'v8', 'v9', 'v10', 'v11')
  </code></pre>
  
  <p>When I try launch my hclust function by this:</p>
  
  <pre><code>singleLinkage &lt;- hclust(mat,method="single")
  </code></pre>
  
  <p>I get error Error in if (is.na(n) || n > 65536L) stop("size cannot be NA nor exceed 65536") : 
    missing value where TRUE/FALSE needed. I think error is in the matrix. In hclust function should be some matrix which is created by dist function, but I did not understand that concept at all. Please can anyone help where is the mistake? Thank you very much. :)</p>