title: Hierarchial clustering in R
body: <p>I am getting the following  error when I use hclust function? How can I solve this problem? 
  I am using windows 7 and 2.12.3 version of R.</p>
  
  <pre><code>n_seq &lt;- 250                                                   
  mat &lt;- matrix(NA, ncol=n_seq, nrow=n_seq)    
  for (idx in 1:n_seq) 
  {mat[idx,idx] &lt;- 0.0}         
  for(idx in 1:(n_seq-1) )
  {intemp &lt;- read.xls("C:// clustal.xls", sheet = idx ); 
  mat[(1+idx):n_seq,idx] &lt;- intemp[1:(n_seq-idx), 11]}
  
  fit &lt;- hclust(as.dist(mat), method="single")
  
  Error in hclust(as.dist(mat), method = "single") : 
  NA/NaN/Inf in foreign function call (arg 11)
  </code></pre>
  
  <p>Please help me to solve this problem.</p>