title: How to find out which package version is loaded in R?
body: <p>I am in a process of figuring out how to use my university cluster. It has 2 versions of R installed. System wide R 2.11 (Debian 6.0) and R 2.14.2 in non-standard location. </p>
  
  <p>I am trying to use MPI together with snow. The code I am trying to run is the following</p>
  
  <pre><code>library(snow)
  library(Rmpi)
  cl &lt;- makeMPIcluster(mpi.universe.size()-1)
  stopCluster(cl)
  mpi.quit()
  </code></pre>
  
  <p>It works without the problems on R 2.11. (I launch the script with <code>mpirun -H localhost,n1,n2,n3,n4 -n 1 R --slave -f code.R</code>). Now when I try to do it with R 2.14.2, I get the following message:</p>
  
  <pre><code>Error: This is R 2.11.1, package 'snow' needs &gt;= 2.12.1
  In addition: Warning message:
  </code></pre>
  
  <p>So it seems that R loads the package snow version compiled for R 2.11. I've installed snow under R 2.14 into my home folder and I added the following lines to my code:</p>
  
  <pre><code>.libPaths("/soft/R/lib/R/library")
  .libPaths("~/R/x86_64-pc-linux-gnu-library/2.11")
  print(.libPaths())
  print(sessionInfo())
  print(version)
  </code></pre>
  
  <p>And the output before the error confirms that I am indeed running R 2.14.2 and my R packages folder is first in search path. But I still get the error. </p>
  
  <p>So my question is how do I determine which version of package is loaded in R? I can see with  <code>installed.packages</code> all the packages which are installed, so maybe there is some function which lists similar information for loaded packages?</p>