开发者

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

I am looking f开发者_C百科or 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


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),]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜