[Rd] Have download.packages consider non-CRAN repositories
Uwe Ligges
ligges at statistik.tu-dortmund.de
Sat Jun 23 17:00:17 CEST 2012
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
>
More information about the R-devel
mailing list