When using update.packages(ask = TRUE), users are prompted with three options when a newer version is available (e.g. on CRAN):
-> can we have a bit more explanation what the letters stand for, like:
There is no cancel option for install.packages(). So, when a new package version without a binary package is found in the repository (e.g. CRAN), users are prompted with just to options: whether to try to install from sources or not:
(y)es will try to install from sources (and maybe compile something).
(n)o will just install the old version again.
I believe, a 3rd option ((c)ancel) would be very handy here, because we do not need to re-install the old version package in case the binary version is not yet available. This would also save bandwith for the CRAN mirrors (if used, of course).
Consistency on questions like this is desirable, and we don't currently have that, so I agree some changes are in order.
I've looked through the base sources for what the prompts are like. I found
(y/N/x) # apparently a typo, (y/N/c) intended
There are also calls on Windows to the winDialog function, which seems somewhat inconsistent in its behaviour: winDialog("ok", "message") allows the dialog to be cancelled, but returns NULL whether cancelled or not; winDialog("yesno", "message") (the only version we appear to use) returns "YES" or "NO", but doesn't allow cancellation.
We do have a local function ask.yes.no() in install.packages(); I think the best solution here would be to export a function like that and use it consistently. But if it's exported, it needs to be carefully designed (e.g. front ends like RStudio may want to be able to replace it with their own dialog). So for now I'm going to fix the typo, and ask on R-devel for contributions of such a function.
I have added a new function askYesNo() to R-devel, and used it in base packages where they were asking yes/no questions. This should make them consistent. Comments on the details are welcome.