Closed rmeans closed 2 years ago
Please set the "CRAN" repository to https://mran.microsoft.com/snapshot/2019-02-01
r["CRAN"] = "https://mran.microsoft.com/snapshot/2019-02-01"
This will use Microsoft time machine feature which mirror CRAN repository at a point which contains compatible packages for R3.5.2 version. https://mran.microsoft.com/timemachine
The latest haven package contains a source package dependency. We do not support source package in SQL Server in windows.
When installing packages such as tidyverse, broom and haven that depend on the package cpp11, sqlmlutils fails with the error:
Resolving package dependencies for (haven)... Downloading package [1/7] readr (2.0.2)... Downloading package [2/7] cpp11 (0.4.0)... Warning in utils::download.packages(pkg$Package, destdir = destdir, available = binaryPackages, : no package 'cpp11' at the repositories Could not find binary version in repo, trying source instead... Found source package, building into a binary package... Error: Failed to download package cpp11.
My install (install_packages.R) script is as follows:
I am running the script with the command:
C:\Program Files\R\R-3.5.2\bin>RScript.exe "C:\Temp\install_packages.R"
I am able to install the package into R on the same machine without issue
C:\Program Files\R\R-3.5.2\bin>R.exe -e "install.packages('haven', type='binary', repos = 'http://cran.us.r-project.org')"