In R: How can I know if my packages are up to date?
Asked Answered
I

2

4

I am looking for a function that will tell me, for a list of packages, which of them is up to date and which is not (I need it so to trace back an R crash).

Thanks,

Tal

Ilka answered 1/4, 2010 at 20:37 Comment(1)
R packages (sorry if it wasn't clear)Ilka
H
10

Well, you could just update them with the update.packages() function.

You could use installed.packages() and available.packages() to find any differences. Just merge the two results together on the name, and then look for version differences.

i <- installed.packages()
a <- available.packages()
ia <- merge(i, a, by="Package")[,c("Package", "Version.x", "Version.y")]
ia[as.character(ia$Version.x) != as.character(ia$Version.y),]
Hawks answered 1/4, 2010 at 21:3 Comment(2)
And that 'comparison by sets' is basically what CRANberries does to compute new or changes packages.Welldefined
old.packages will list the out of date ones.Acoustician
S
1

updateme is a really handy package that indicates if a new package version is available:

# install.packages("updateme")
library(updateme)
library(tidyverse) # check if there any new versions of tidyverse packages available

enter image description here

Saltarello answered 15/3 at 9:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.