简体   繁体   中英

update.packages() repeatedly asks me for EVERY package. How do I stop it?

When running update.packages() in R how do I avoid answering "do you want to update this package" a hundred times?

update.packages() asks me individually if I want to update nearly every package I have with the prompt shown as y/n/c . I end up hitting Y then Enter repeatedly for five minutes. What does the "C" mean? Does it get me around this problem? I don't dare choose that option not knowing what it means. Y is obviously Yes and N is obviously No. C? Anybody's guess?

See in the help for update.packages ( ?update.packages ):

ask: logical indicating whether to ask the user to select packages before they are downloaded and installed, or the character string "graphics", which brings up a widget to allow the user to (de-)select from the list of packages which could be updated. (The latter value only works on systems with a GUI version of select.list, and is otherwise equivalent to ask = TRUE.)

So the behaviour you are expecting can be accomplished with the following:

update.packages(ask = FALSE)

The c in y/n/c simply means c ancel and stops the update process completely. Another trick to speed things up is to set the number of cores used for installing packages: eg, update.packages(ask = FALSE, Ncpus = 3L) .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM