Prefer install packages from binaries in Windows

Other Options

Looking through ?options it appears there are a couple that might produce the behavior you're looking for.

install.packages.compile.from.source

Setting install.packages.compile.from.source to "interactive" should prompt you for the decision interactively.

options(install.packages.compile.from.source = "interactive")

From the docs:

Used by install.packages(type = "both") (and indirectly update.packages) on platforms which support binary packages. Possible values are "never", "interactive" (which means ask in interactive use and "never" in batch use) and "always". The default is taken from environment variable R_COMPILE_AND_INSTALL_PACKAGES, with default "interactive" if unset. However, install.packages uses "never" unless a make program is found, consulting the environment variable MAKE.

pkgType

Another one to try as it appears to specify the behavior and wouldn't require interactive prompts.

options(pkgType = "win.binary")

From the docs:

pkgType:
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).

2 Likes