title: Check for installed packages before running install.packages()
body: <p>I have an R script that is shared with several users on different computers. One of its lines contains the <code>install.packages("xtable")</code> command.</p>
  
  <p>The problem is that every time someone runs the script, R spends a great deal of time apparently reinstalling the package (it actually does take some time, since the real case has vector of several packages).</p>
  
  <p>How can I make first check if the packages are installed and then only run <code>install.packages()</code> for the ones that are not?</p>