[Rd] contrib.url in non-interactive mode
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Feb 14 11:54:38 CET 2014
On 14/02/2014 10:03, Renaud Gaujoux wrote:
> Hi,
>
> is it intended that one cannot install packages in non-interactive mode,
> without explicitly setting a CRAN mirror (see below)?
> Couldn't a default mirror be used in that case?
> Thank you.
You seem to be talking about installing from CRAN. The intention is
indeed that in non-interactive use you have to select the repositories
you want to use. See ?setRepositories and its links.
It is up to you to set a default mirror: we have little idea where you
live (and it may not be where your email address suggests). Geolocation
of mirrors had been mooted but not implemented (and in a corporate
setting is not 100% reliable). The whole point of mirrors is to spread
the load: without them there would be no CRAN as the main host would not
allow the traffic.
This would have been appropriate for R-help, if it would not have been
answered by doing the homework required by the posting guide (which also
requires no HTML ...).
>
> Bests,
> Renaud
>
> $ Rscript --vanilla -e "install.packages('whatever')"
> Installing package into '/home/renaud/R/x86_64-pc-linux-gnu-library/3.0'
> (as 'lib' is unspecified)
> Error in contrib.url(repos, type) :
> trying to use CRAN without setting a mirror
> Calls: install.packages -> grep -> contrib.url
> Execution halted
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-devel
mailing list