[R-sig-eco] from estUD to SpatialGridDataFrame in adehabitatMA

Clement Calenge clement.calenge at oncfs.gouv.fr
Fri Mar 23 16:37:42 CET 2012


Hi,

Please consider this example:


 >     ## Load the data
 >      data(puechabonsp)
 >      loc <- puechabonsp$relocs
 >      ## Estimation of UD for the four animals
 >      (ud <- kernelUD(loc[,1]))
********** Utilization distribution of several Animals ************

Type: probability density
Smoothing parameter estimated with a  href smoothing parameter
This object is a list with one component per animal.
Each component is an object of class estUD
See estUD-class for more information


As indicated, the result is a list with one estUD per animal. See for 
example the first element:


 > ud[[1]]
********** Utilization distribution of an Animal ************

Type: probability density
Smoothing parameter estimated with a  href parameter
This object inherits from the class SpatialPixelsDataFrame.
See estUD-class for more information

As indicated, this object already inherits the class 
SpatialPixelsDataFrame. So that all functions requiring a 
SpatialPixelsDataFrame can take this object as argument. No need for 
coercion:

 > inherits(ud[[1]], "SpatialPixelsDataFrame")
[1] TRUE

HTH,

Clément Calenge.






On 03/23/2012 03:44 PM, Sebastian P. Luque wrote:
> Hi,
>
> Before adehabitat was split, I used the function asc2spixdf() to convert
> the estimated UD to SpatialGridDataFrame.  I see that there's a
> estUDm2spixdf() to convert it to SpatialPixelsDataFrame.  Should the
> coercion to SpatialGridDataFrame be done separately in sp?
>
> Cheers,
>


-- 
Clément CALENGE
Cellule d'appui à l'analyse de données
Direction des Etudes et de la Recherche
Office national de la chasse et de la faune sauvage
Saint Benoist - 78610 Auffargis
tel. (33) 01.30.46.54.14



More information about the R-sig-ecology mailing list