[R-sig-eco] Fwd: adehabitatHR and kernelUD problems estimating home range size
Isabella Mandl
im14850 at bristol.ac.uk
Sat Jan 21 17:10:25 CET 2017
SOLVED
Dear Clément,
thank you, that really did the trick! I had simply not projected the data!
Perfect!
All the best,
Isabella
On 21 January 2017 at 16:09, Calenge Clement <Clement.Calenge at oncfs.gouv.fr>
wrote:
> Dear Isabella,
>
> I do not have the data, but it seems that there is a problem with your
> object coords:
>
> >> str(coords)
> > Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots
> > ..@ data :'data.frame': 4423 obs. of 2 variables:
> > .. ..$ Individual: Factor w/ 14 levels "1","2","3","4",..: 1 1 1 1 1
> 1 1
> > 1 1 1 ...
> > .. ..$ Season : Factor w/ 2 levels "DRY","WET": 1 1 1 1 1 1 1 1 1
> 1 ...
> > ..@ coords.nrs : int [1:2] 4 3
> > ..@ coords : num [1:4423, 1:2] 47.8 47.8 47.8 47.8 47.8 ...
> > .. ..- attr(*, "dimnames")=List of 2
> > .. .. ..$ : NULL
> > .. .. ..$ : chr [1:2] "Easting" "Southing"
> > ..@ bbox : num [1:2, 1:2] 47.8 -14.4 47.8 -14.4
> > .. ..- attr(*, "dimnames")=List of 2
> > .. .. ..$ : chr [1:2] "Easting" "Southing"
> > .. .. ..$ : chr [1:2] "min" "max"
> > ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slot
> > .. .. ..@ projargs: chr "+init=EPSG:32638 +proj=utm +zone=38
> +datum=WGS84
> > +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0"
>
> Note that the slot @bbox indicates that all the points are located at
> the same place: xmin=xmax=47.8; ymin=ymax=-14.4. Similarly, the slot
> @coords indicate the same coordinates for all points (47.8, 47.8, etc.).
> Are you sure that you set your CRS correctly? My guess is that you have
> your coordinates in Latitude/Longitude, and that you defined the
> proj4string slot without projecting your data, i.e. you used :
>
> proj4string(coords) <- CRS("+init=EPSG:32638")
>
> instead of
>
> proj4string(coords) <- CRS("+init=EPSG:4326")
> coords <- spTransform(coords, CRS("+init=EPSG:32638"))
>
> However, this is just a guess.
> HTH,
>
> Clément Calenge
>
>
> --
> Clément CALENGE
> Ingénieur Expert -- Biométricien
> Cellule d'appui méthodologique
> Direction de la Recherche et de l'Expertise
> Office national de la chasse et de la faune sauvage
> Saint Benoist - 78610 Auffargis
> tel. (33) 01.30.46.54.14
>
[[alternative HTML version deleted]]
More information about the R-sig-ecology
mailing list