From murdoch.duncan at gmail.com  Wed Jul 29 19:46:43 2015
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Wed, 29 Jul 2015 13:46:43 -0400
Subject: [Rd] update.packages(checkBuilt=TRUE, ask=FALSE): possible bug
In-Reply-To: <55B90580.4010207@yorku.ca>
References: <CAN+Emd-n=kZCGSV6DuMPLi-UFsztywtZ3h+cVaLuPYyHFbuYaw@mail.gmail.com>	<21FF8325-EE50-480E-9729-E0440D6587EE@gmail.com>
	<55B90580.4010207@yorku.ca>
Message-ID: <55B91183.6000306@gmail.com>

On 29/07/2015 12:55 PM, Michael Friendly wrote:
> On 7/19/2015 3:50 AM, peter dalgaard wrote:
> >> For some, but not allI repositories I get the error message below:
> >> >Error in install.packages(update[instlib == l, "Package"], l, contriburl =
> >> >contriburl,  :
> >> >  specifying 'contriburl' or 'available' requires a single type, not type =
> >> >"both"
> >> >
> >> >Is it a bug?
>
> I think that what Jose is referring to is this error message from
> install.packages(), even though he set
> options(pkgType='binary')
> Isn't that a bug?
>
> Moreover, in a fresh R 3.2.1 session [Platform: x86_64-w64-mingw32/x64
> (64-bit)], I see
>   > getOption("pkgType")
> [1] "both"
>
> I think this is somehow related to the fact that install.packages() will
> now tell you if a more current source package exists and ask if you want
> to install from source.  But this would require RTools to
> be installed to work.
>
> IMHO, I consider this a major infelicity or design flaw, that will cause
> problems for naive and even experienced users.  install.packages("foo")
> should always work unless package "foo" cannot
> cannot be found in getOption("repos")

I'd like to see a reproducible example before I declared it to be a bug 
that needs fixing.

Do note the news item in R-patched (soon to be R 3.2.2):

| - download.packages()| failed for |type| equal to either |"both"| or 
|"binary"|. (Reported by Dan Tenenbaum.)

install.packages() can call download.packages(), so this might have been 
fixed now.

Duncan Murdoch



[Rd] update.packages(checkBuilt=TRUE, ask=FALSE): possible bug
Duncan Murdoch