Additionally, everytime you upgrade to a new version of R, the default behavious is to NOT copy the old collection of libraries from the older version to the newer version. Consequently, you need to reinstall all of the packages that you collected in the old version. This can be inconvenient.
Because of these potential problems, it is recommended that you create a personal package library where any new package that you install will be placed. This personal library can easily be upgraded with a single command whenever a new version of R is installed using the update.packages() function, or the drop down menus in R and Rstudio.
Refer to FAQ 4.2 of R for more details.
Here are instruction for Windoze and Macintosh machines. If you have a Unix machine that is not a Macintosh, the instructions will be similar to that from the Macintosh.
Many corporate and goernment environments "lockdown" computers so users cannot install packages following
the step above.
Here are instruction on how to install packages when you do not have administrative access to your Windoze machine.