title: Calling Fortran from R, Partitioning around medoids
body: <p>Im trying to use the PAM algorithm in the cluster package. My dataset is large, so I keep getting this error when I run the following code </p>
  
  <pre><code>#create clusters
  pam_fit&lt;- pam(costs, 10, diss =FALSE) #where cost is a datasets with 3 variables, all numeric 
  
  #the error I get is the following 
  Error in pam(costs, 10, diss = FALSE) : 
    long vectors (argument 5) are not supported in .Fortran
  </code></pre>
  
  <p>this link seems to suggest that there is a way around it (.call?) but Im not too sure how to do that
  <a href="http://stat.ethz.ch/R-manual/R-devel/library/base/html/LongVectors.html" rel="nofollow">http://stat.ethz.ch/R-manual/R-devel/library/base/html/LongVectors.html</a></p>
  
  <p>PS: I know 0 Fortran so if the answer requires running anything in Fortran please be as detailed as possible!!!</p>
  
  <p>thanks. </p>