Skip to content
Prev 2897 / 7420 Next

from estUD to SpatialGridDataFrame in adehabitatMA

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

I am not familiar with these functions so I will be of little help here.
However, you may still use the function "write.asciigrid" from sp.
Best,

Cl?ment Calenge.