Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 612
Tal Galili Avatar asked Oct 23 '25 21:10

Tal Galili


1 Answers

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),]
like image 114
Shane Avatar answered Oct 25 '25 10:10

Shane