Hello
I wonder if anybody can help,
I am using the package adehabitatHR to estimate the potential distribution of a species using the command "domain"

In the example given in the AdehabitatHS manual a map containing elevation information is loaded (class= spatial pixels data frame) as well as the GPS points of the animals being tracked, these are then plotted on each other and estimation of habitat suitability performed.

I have a map containing sea depth information in the form of a shapefile which I want to relate to some GPS tracks I have, however I believe that the shapefile with my sea depth information has to be of the class spatial pixels data frame before I can perform many of the analysis in AdehabitatHS,

I have tried converting the shapefile to a spatial pixel data frame using the sp package by exporting the data from the attribute table in my depth shapefile then importing it into R as a csv file (see my attempts below)

>depth<-read.csv("depthmap.csv")
>pts = depth[c("x", "y")]
>y = SpatialPixels(SpatialPoints(pts))

suggested tolerance minimum: 1
Error in points2grid(points, tolerance, round) :
 dimension 1 : coordinate intervals are not constant

> depth<-read.csv("a.csv")
> coordinates(depth) <- c("x", "y")
> points2grid(depth)
suggested tolerance minimum: 1
Error in points2grid(depth) :
  dimension 1 : coordinate intervals are not constant

Bur these do not seem to work, does anyone have any ideas?

Many thanks
Louise Soanes


School of Environmental Sciences
University of Liverpool
Brownlow Hill
L69 3GP

http://sites.google.com/site/puffinislandseabirdresearch/


	[[alternative HTML version deleted]]

