title: dist() function in R: vector size limitation
body: <p>I was trying to draw a hierarchical clustering of some samples (40 of them) over some features(genes) and I have a big table with 500k rows and 41 columns (1st one is name) and when I tried </p>
  
  <pre><code>d&lt;-dist(as.matrix(file),method="euclidean")
  </code></pre>
  
  <p>I got this error</p>
  
  <pre><code>Error: cannot allocate vector of size 1101.1 Gb
  </code></pre>
  
  <p>How can I get around of this limitation? I googled it and came across to the ff package in R but I don't quite understand whether that could solve my issue. </p>
  
  <p>Thanks!</p>