[R] loading packages

Roger Bivand Roger.Bivand at nhh.no
Tue Oct 23 15:25:04 CEST 2001


Elena:

On Tue, 23 Oct 2001, Elena Moltchanova wrote:

> Thanks to Roger for pointing out the packages spweights and sptests to
> me. I believe they will be quiet useful in my work. But... I can't get
> them to work!
> 
> Firstly, I realised that a newer version of R is available. I have now
> downloaded and installed it. When I try to 'install packages from CRAN'
> I get:
> 
> trying URL `http://cran.r-project.org/bin/windows/contrib/PACKAGES'
> unable to connect to 'cran.r-project.org'.
> Error in download.file(url = paste(contriburl, "PACKAGES", sep = "/"),
> :
>         cannot open URL
> `http://cran.r-project.org/bin/windows/contrib/PACKAGES'
> 
> although my Netscape has no problems locating it.
> 
> Whan I unzip the files to the library-subdirectory the command
> 
> library(spweights)
> 
> results in
> 
> Warning message:
> Package  `spweights' contains no R code in: library(pkg, character.only
> = TRUE)

This happens when one installs a package source as though it was a binary,
because library() doesn't find the R code.

> 
> although library(help=spweights) produces a window with the desired
> information.
> 
> I cannot use 'install package from local zip.-file' because the packages
> are in .tar.gz-format.
> 
If the files you found are in *.tar.gz format, then they are the source
files, not the Windows binaries.

The *.zip files are in http://cran.r-project.org/bin/windows/contrib/ and
should be installable with the menu item: "Packages" -> "Install package
from local zip file", if -> "Install package from CRAN" doesn't fly for
you (does for me).

Roger

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no
and: Department of Geography and Regional Development, University of
Gdansk, al. Mar. J. Pilsudskiego 46, PL-81 378 Gdynia, Poland.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list