Error in install.packages : Updating loaded packages (ggplot)

When I am trying to install ggplot I get the following message:
Error in install.packages : Updating loaded packages

It asks me to restart but when I press "Yes" it try to restart but does not succeed.

Based on a similar discussion in RStudio Community (Issue with installed.packages) I tried the following but still no luck:

  1. Used Ctrl + Shift + F10 to restart.
  2. Re-installed R and RStudio
  3. Tried using a new session.

Appreciate if anyone can help.

It probably means that it is already installed

and you should just call library() instead.

It works. Thank you!