[R-sig-Geo] KernelUD image scale bar

Mathieu Basille basille.web at ase-research.org
Sat Sep 28 00:28:14 CEST 2013

Dear Lutfor,

Following the example of ?kernelUD:

## Load the package

## Load the data
loc <- puechabonsp$relocs

## Estimation of UD for the four animals
(ud <- kernelUD(loc[,1]))

## The UD of the four animals

## First one with a scale

Then you'd be able to adjust it using spplot options (I'm not a specialist 
of this, I just know it can be fairly complex). The reason it works is that 
kernelUD produces an object of class estUDm, which is a list with one estUD 
object per animal. An estUD object itself inherits from the class 
SpatialPixelsDataFrame. As a result, every function that works on a spdf 
would work on an estUD too.

Things will get a little bit trickier if you want all kernels on the same 
scale. That's where you need to use the argument 'same4all = TRUE':

## Recompute the UD with the same grid for all animals
(ud2 <- kernelUD(loc[,1], same4all = TRUE))

## Convert it to a regular spdf
ud2 <- estUDm2spixdf(ud2)

## And plot

Voilà !

Hope this helps,

Le 09/27/2013 05:44 PM, Lutfor a écrit :
> Dear members,
> I have been trying to give scale bar on kernel contour map using
> adehabitatHR package. But I could not find any function to put scale bar
> onto the image produce.
> Any help would be much appreciated.
> Regards
> Lutfor
> UK
> --
> View this message in context: http://r-sig-geo.2731867.n2.nabble.com/KernelUD-image-scale-bar-tp7584738.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo


~$ whoami
Mathieu Basille, PhD

~$ locate --details
University of Florida \\
Fort Lauderdale Research and Education Center
(+1) 954-577-6314

~$ fortune
« Le tout est de tout dire, et je manque de mots
Et je manque de temps, et je manque d'audace. »
  -- Paul Éluard

More information about the R-sig-Geo mailing list