title: How to automatically update R to the latest version?
body: <p>I am posting this issue here as I suppose it bothered many R users. It is recommended to update R and packages as frequently as possible (see <a href="https://community.rstudio.com/t/should-i-update-all-my-r-packages-frequently-yes-no-why/5856" rel="nofollow noreferrer">https://community.rstudio.com/t/should-i-update-all-my-r-packages-frequently-yes-no-why/5856</a>). Yet, this can be time consuming to look if your version is the latest one, download the last version of R and reinstall all your packages.</p>
  
  <p>Recently I discovered the installr package. It provided the very nice function updateR(). According to the documentation, the updateR() function performs the following: finding the latest R version, downloading it, running the installer, deleting the installation file, copy and updating old packages to the new R installation</p>
  
  <p>Thanks to this post: <a href="https://stackoverflow.com/questions/25721884/how-should-i-deal-with-package-xxx-is-not-available-for-r-version-x-y-z-wa">How should I deal with &quot;package &#39;xxx&#39; is not available (for R version x.y.z)&quot; warning?</a></p>