How to only upgrade to binary package versions?

Is there any way to always and automatically answer "no" when update.packages() asks about compiling source versions? I would like to always have the updater run through completely, and am fine with waiting for a bit until binaries become available.

I have tried adding update.packages.check.source = "no" and FALSE options to my .Renviron file, but R keeps prompting me, stalling the update process.

1 Like

@KatrinLeinweber Try setting options(pkgType = "binary") before running update.packages(). To make this always be the default behavior, you can add that line to your .Rprofile file.

Here is the relevant section from ?options:

The default type of packages to be downloaded and installed – see install.packages. Possible values are platform dependently

on Windows
"win.binary", "source" and "both" (the default).

on unix-alikes
"source" (the default except under a CRAN macOS build), "mac.binary.el-capitan" and "both" (the default for CRAN macOS builds). ("mac.binary.mavericks", "mac.binary.leopard", "mac.binary.universal" are no longer in use.)

Value "binary" is a synonym for the native binary type (if there is one); "both" is used by install.packages to choose between source and binary installs.

Thank you :slight_smile: I was searching for the wrong keywords before before m-)

@charlesdarwin: This also answers your question in Meaning of common message when install a package "There are binary versions available but the source versions are later" - #3 by charlesdarwin, I think :wink:

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.