Upgrading ggplot2

{ggplot2} only requires R 3.4 or greater, so that's not the problem, but see this post to fix repo problem. You should consider updating R; lagging behind by a version and its two point releases will lead to difficulties.