converting a single animal home range (estUD) to spixdf
Leila Brook wrote
Hello, I am wondering whether anyone knows a way to convert estUD home range objects to the spatialpixelsdataframe class in adehabitatHR. I have tried using estUDm2spixdf() but this requires an estUDm class for multiple animal home ranges rather than a single animal home range of estUD class. I am using R 2.15.1 64-bit and the latest version of adehabitatHR. If anyone has a tip on how to do this I would greatly appreciate it. Kind regards
I suspect Clement C. may have a better solution, but here is a cheap workaround that should do the trick. a <- simm.crw(1:100,id="a") b <- simm.crw(200:300,id="b") bb1 <- kernelbb(a,1,0.2) #sig1, sig2 value just picked by me bb2 <- kernelbb(c(a,b),1,0.2) str(bb1) str(bb2) #Notice the difference in structure, estUDm is a list of estUD bb1.estUDm <- list() bb1.estUDm$a <- bb1 #basically just build a list here class(bb1.estUDm) <- "estUDm" #set the class attribute str(bb1.estUDm) spdf <- estUDm2spixdf(bb1.estUDm) image(spdf) Cheers Jed ----- Jed Long SPAR Lab, Dept. of Geography University of Victoria, Canada -- View this message in context: http://r-sig-geo.2731867.n2.nabble.com/converting-a-single-animal-home-range-estUD-to-spixdf-tp7581631p7581641.html Sent from the R-sig-geo mailing list archive at Nabble.com.