From ligges at statistik.tu-dortmund.de  Sat Jun 23 17:00:17 2012
From: ligges at statistik.tu-dortmund.de (Uwe Ligges)
Date: Sat, 23 Jun 2012 17:00:17 +0200
Subject: [Rd] Have download.packages consider non-CRAN repositories
In-Reply-To: <CAGX06KOXG1iuiaxiDitBfqx7v6ZXPKA4XGPmUsnKKW5_tr4KpQ@mail.gmail.com>
References: <CAGX06KOr_pi+CXFduJqdVz78kVcmjC8HK1GyvsXYh3Vy502J1Q@mail.gmail.com>
	<4FE30DFB.1060003@gmail.com>
	<4FE316E0.3010407@statistik.tu-dortmund.de>
	<CAGX06KOXG1iuiaxiDitBfqx7v6ZXPKA4XGPmUsnKKW5_tr4KpQ@mail.gmail.com>
Message-ID: <4FE5DA01.6030101@statistik.tu-dortmund.de>



On 22.06.2012 15:10, Ingmar Schuster wrote:
> Hi Uwe and List,
>
> Thanks for your suggestions.
>
> It's a complete repository with source Packages and the PACKAGES(.gz)
> index file under "src/contrib/". As mentioned: explicitly calling
>
> install.packages("PACKAGE_NAME",
> repos="file:///Users/arbeit/Documents/clarin/Open_Science/PMR2/",
> type="source");
>
> works without any problems. But configuring the repository through
> R_HOME/etc/repositories and obmitting the repos argument to
> install.packages() is what I want and what doesn't work. Ideas?

1. I haven't tried your syntax from above, but I'd rather use
  "file:/Users/arbeit/Documents/clarin/Open_Science/PMR2"
or under Windows in a safer way::
  "file:c:/Users/arbeit/Documents/clarin/Open_Science/PMR2"

2. Maybe you forgot to set the Repository active via setRepositories()?

3. Why don't you just set the repositories at startup, e.g. in 
Rprofile.site or your personal .Rprofile via:

local({
       r <- getOption("repos")
       r["myCRAN"] <- "file:////store/ligges/public_html/CRAN"
       options(repos=r)
})

works for me with store being a machine in the network (via UNC path).

Best,
uwe Ligges




>> And note that is must be a complete repository, i.e. packages in subdir
>> "./src/contrib". A user can use install.packages(....., type="source") if
>> you do not provide binaries in case they are expected by default.
>>
>> Uwe Ligges
>
> I knew about the type="source" argument to install.packages() but
> hoped there would be a way to permanently configure this as default
> for a source-only repository.
>
>
> Thanks,
> Ingmar Schuster
>



[Rd] Have download.packages consider non-CRAN repositories
Uwe Ligges