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

Sebastian P. Luque spluque at gmail.com
Fri Mar 23 19:18:55 CET 2012


On Fri, 23 Mar 2012 17:33:46 +0100,
Clement Calenge <clement.calenge-65xOkShCj2YVnxGAtMSvJw at public.gmane.org> wrote:

[...]

> I have the same problem. But I am not sure that the class estUD is the
> cause here. Indeed, transforming the object to the class
> SpatialPixelsDataFrame does not change the problem:

>> locs.gtiff <- create2GDAL(as(ud[[1]], "SpatialPixelsDataFrame"),
> + drivername="GTiff")
>> locs.gtiff <- create2GDAL(ud[[1]],
> + drivername="GTiff")
>> locs.aaigrid <- copyDataset(locs.gtiff,
> + driver="AAIGrid")
>> saveDataset(locs.aaigrid, "~/tmp/test.asc")
> Error in .local(.Object, ...) : Dataset copy failed

saveDataset() does not seem to expand "~" to ${HOME}, so providing the
full expanded path does succeed.

Cheers,

-- 
Seb



More information about the R-sig-ecology mailing list