Hi, and welcome!
For future questions that involve coding, please see the FAQ: What's a reproducible example (`reprex`) and how do I do one? Using a reprex, complete with representative data will attract quicker and more answers. This doesn't apply to your question.
OneDrive
is networked attached in Windows? If so, try installing R
to your local drive and doing install.packages(ggplot2)
again. If you can't install R
to a local drive because your workstation is required to use OneDrive, ask the network administrator if your permissions are correct.