Skip to content

FInd packages in need of Update (like RStudio)

7 messages · Dr Eberhard W Lisse, Sarah Goslee, Jeff Newmiller +1 more

#
Hi,

does anyone know how one would look which packages require an update
(like the Tools -> Update Packages) but can do it from R (ie Rscript) or
any other way from the command line (on the MAc)

I would like to build this into my update script which currently does
brew, cpan and pip3 :-)-O

greetings, el
#
Does update.packages() meet your needs?


Sarah
On Wed, Dec 23, 2020 at 9:39 AM Dr Eberhard W Lisse <el at lisse.na> wrote:

  
    
#
This is not normally something one would apply automatically, as it can break existing code. But wouldn't?update.packages be the obvious choice interactively?
On December 23, 2020 6:38:41 AM PST, Dr Eberhard W Lisse <el at lisse.NA> wrote:

  
    
#
On Wed, Dec 23, 2020 at 8:09 PM Dr Eberhard W Lisse <el at lisse.na> wrote:
? old.packages

Best,
-Deepayan
#
Thanks,

	update.packages(dependencies = TRUE, ask=FALSE)

does what I want.

greetings, el
On 2020-12-23 17:30 , Deepayan Sarkar wrote:

  
    
#
Or rather

	Rscript -e 'local({r <- getOption("repos");r["CRAN"] <-
"https://cloud.r-project.org/";options(repos =
r)});update.packages(dependencies = TRUE, ask=FALSE)'

as a one liner :-)-O

el
On 2020-12-23 17:59 , Dr Eberhard W Lisse wrote:

  
    
#
Thank you,

but the RFTM suggestion helped me even more :-)-O

greetings, el
On 2020-12-23 17:06 , Sarah Goslee wrote: