[R-sig-Geo] difficulty loading package "sp"

Rolf Turner r.turner at auckland.ac.nz
Sun Nov 21 20:09:22 CET 2010


On 21/11/2010, at 4:25 PM, Mike Marsh wrote:

> Hello all,
> This is my first message to this list.
> I'm reading "Applied spatial data analysis with R", and trying to 
> install "sp".
> I went to http://cran.r-project.org/ then to  Packages, but did not find 
> "sp"

	You can't have looked very hard.

> I found and downloaded sp_0.9-72.zip 
> <http://cran.r-project.org/bin/windows/contrib/r-release/sp_0.9-72.zip>from 
> the page linked to CRAN Task View Analysis of Spatial Data, moved the 
> zipped package to my library folder under R-2.8.1, and unzipped it, 
> obtaining folder sp_0.9-72 I opened R in folder library, and called
> 
>> library(sp)
> Error in library(sp) : there is no package called 'sp', version 0.9-72
> then I tried
>> library(sp_0.9-72)
> Error in library(sp_0.9 - 72) : 'package' must be of length 1
> then I opened sp 0.9.-72 and moved folder sp to be under the parent 
> directory, library
>>> library(sp)
> Error: This is R 2.8.1, package 'sp' needs >= 2.10.0

	You need to install the package before you try to load it.
> 
> I tried "update.package"
> 
>> update.packages(sp)
> Error in update.packages(sp) : object "sp" not found

	Look at the error message.  There is no object named "sp" in your
	search path.  You would need to to update.packages("sp") were this
	the appropriate thing to do.  Which it isn't.  You haven't yet
	(ever) installed sp, so how can you update it?

	Try doing install.packages("sp").
>> 
> I then tried Update Packages(), which resulted in me updating a bunch of 
> other packages, but unfortunately left them in 
> C:\WINDOWS\Temp\RtmpmtERQd\downloaded_packages, and considering my 
> success so far, I'm afraid to move them or touch them.
> I was running R-2.8.0 last year when I took Jon Bakker's course 
> "Analytical methods for community ecology", but upgraded this year to 2.8.1.
> Not knowing where to find a package "sp" that is >= 2.10.0, I turn to 
> you for help.

	The current version of R is 2.12.0.

		cheers,

			Rolf Turner


More information about the R-sig-Geo mailing list