callr-org / website

http://callr.org
6 stars 0 forks source link

install: Error in install.packages(update[instlib == l, "Package"], l, contriburl = contriburl, ... #10

Closed HenrikBengtsson closed 9 years ago

HenrikBengtsson commented 9 years ago

source('http://callr.org/install#<pkg>') gives the below error on Windows (only) in at least R 3.0.3, 3.1.2, but not in 3.1.2 Patched (2015-02-22 r67879) and not in R (>= 3.1.3).

Reproducible example

> getRversion()
[1] '3.0.3'

## Make sure aroma.affymetrix 2.13.0 is installed
> install.packages("aroma.affymetrix", repos="http://cran.r-project.org")

## Try to update to aroma.affymetrix 2.13.1
> source('http://callr.org/install#aroma.affymetrix')
Installing/updating package: 'aroma.affymetrix'
NOTE: Detected option pkgType='win.binary'. Changed to 'both' during this instal
lation process in order to make sure the most up-to-date versions of packages ar
e installed in case they are only available as source.
aroma.affymetrix :
 Version 2.13.0 installed in C:/Users/hb/R/win-library/3.0
 Version 2.13.1 available at http://braju.com/R
Update (y/N/c)?  y
Error in install.packages(update[instlib == l, "Package"], l, contriburl = contriburl,  :
  type == "both" cannot be used if 'available' or 'contriburl' is specified
In addition: Warning message:
In installer(pkgs) :
  NOTE: Detected option pkgType='win.binary'. Changed to 'both' during this inst
allation process in order to make sure the most up-to-date versions of packages
are installed in case they are only available as source.

Originally reported by Nipun Mistry @ MD Anderson for Windows R 3.1.1.

HenrikBengtsson commented 9 years ago

Since this happens for outdated R versions, I've decided to simply disable the automatic change to using pkgType="both". This way there is no longer an error.