I find it annoying that I have to click Tools -> Update Packages every time I load RStudio. I could use update.packages(c("ggplot2"))
for instance to update my packages in .RProfile, but the issue is that it won't look for other packages (dependencies). For instance, I have to update "seriation" and "digest" package every time I start RStudio, and these packages are not loaded by me at start-up. Does anyone have code to automatically check and update all packages at start-up ? If so, can you please share here? I extensively googled this topic and searched through SO, and it seems that popular opinion is to use RStudio's menu. Here's the thread I am referring to: How to update R2jags in R?
One way I can think of doing this is in .RProfile:
a<-installed.packages()
b<-data.frame(a[,1])
and then calling this function: https://gist.github.com/stevenworthington/3178163
However, I am not quite sure whether this is the most optimal method.
Another linked thread is: Load package at start-up
I created the thread above. I'd appreciate any thoughts.