I'm currently on ggplot2 version 3.3.2, and R version 3.6.1. I understand to use ggally, I need to be on ggplot2 3.3.4 or higher. But I'm having trouble upgrading ggplot2.
I tried
> update.packages("ggplot2")
It prompted me to pick a CRAN mirror, but nothing happened after. ggplot2 is still on version 3.3.2 after.
Is it possible that I also need to upgrade R itself? Here's what my R sessionInfo() and repos look like
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS/LAPACK: /mnt/nfs/USERNAME/lib/R/lib/libRblas.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.6.1
and
> getOption("repos")
CRAN
"@CRAN@"
Is it possible my R is pinned to a version that doesn't allow for upgrading of 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.
By passing "ggplot2" as an unnamed argument you were actually telling the function to use "ggplot2" as the lib.loc argument (the location of an R package library in your system), and that is most certainly not a valid location. I think you need to use the oldPkgs argument for specifying which packages to consider.