how do I update ggplot2?

packageupdate

#1

Split from Why geom_col could not be found even we have ggplot2?


Hi,
I am trying to update my ggplot2 version from 2.1.0 to 2.2.0 to work with geom_col() but it's showing ggplot2 2.1.0 is the updated version. How to do that? Please reply


Why geom_col could not be found even we have ggplot2?
#2

Hi, and welcome to community.rstudio.com! Have you attempted update.packages("ggplot2")?


#3

Which package versions are reported as available for your system can depend on your version of R. It can also depend on whether your R and RStudio are configured to install packages from CRAN, or from a locally managed repository. To figure out what's going on, it would also be helpful to see the output of running the following commands:

sessionInfo()
getOption("repos")

(please copy and paste the output here, then select it and click the little </> button at the top of the posting box to format it properly).

Also, where exactly are you seeing this? (In a console message? In the window that appears when you click Update in the RStudio Packages pane?)


#5


#6

Hi,
it's not getting updated.


#7
sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] RevoUtilsMath_10.0.0 RevoUtils_10.0.2     RevoMods_10.0.0      MicrosoftML_1.0.0   
[5] mrsdeploy_1.0        RevoScaleR_9.0.1     lattice_0.20-34      rpart_4.1-10        

loaded via a namespace (and not attached):
 [1] codetools_0.2-15       CompatibilityAPI_1.1.0 foreach_1.4.3          grid_3.3.2            
 [5] R6_2.2.0               jsonlite_1.1           curl_2.2               iterators_1.0.8       
 [9] tools_3.3.2            mrupdate_1.0.0        
> getOption("repos")
                                                      CRAN 
"https://mran.revolutionanalytics.com/snapshot/2016-11-01" 
                                                 CRANextra 
                      "http://www.stats.ox.ac.uk/pub/RWin"

#8

You are using Microsoft R open distribution with snapshotted CRAN. This means that all packages are frozen to the version that they were at 2016-11-01 (you can see it in the output of your getOption("repos") command).

However, Microsoft R has been updated since then and (from what I remember), it is already on par with GNU R (so both are at 3.5.1). If you want, you can either update your distribution of R altogether, or you can change the date of the snapshot to something more recent and update packages afterwards. One package that can help you with that is checkpoint.