Hello all
I am trying to use the kernelbb method to estimate home range of several birds that I have GPS tracked, however I do not want to include time spent on land between trips, so I have performed the analysis on individual trips and then have tried to combine the UD’s as has previously been suggested in other posts on this forum, however I am having trouble combining the UD’s of the different trips, and does anybody know what the error message below means when I try to work out the 50% homerange area?

> data<-read.csv("three.csv")
> library(adehabitatHR)
> gmt<-(data$gmt)
> data$gmt<-as.POSIXct(strptime(gmt, "%d/%m/%Y%H:%M:%S"))
> tr=as.ltraj(xy, data$gmt, id, burst = data$Burst, typeII = TRUE, slsp ="remove")
> lik<-liker(tr, sig2=1, rangesig1=c(10, 100))
> hrBB <- kernelbb(tr, sig1 =  6, sig2 = 1, grid = 100, byburst=TRUE)
> hrBB
> image(hrBB)
> plot(getverticeshr(hrBB, 95), add=TRUE, lwd=2)
> plot(getverticeshr(hrBB, 50), add=TRUE, lwd=2)
Error in plot(getverticeshr(hrBB, 50), add = TRUE, lwd = 2) :
  error in evaluating the argument 'x' in selecting a method for function 'plot': Error in re[[i]] : subscript out of bounds
> j<-kernel.area(hrBB, unout=c("km2"))
> j
         X1       X2       X3       X4
20 0.000000 0.000000 0.000000 0.000000
25 0.000000 0.000000 0.000000 0.000000
30 0.000000 0.000000 0.000000 0.000000
35 0.000000 0.000000 0.000000 0.000000
40 0.000000 0.000000 0.000000 0.000000
45 0.000000 0.000000 1.403292 0.000000
50 0.000000 0.000000 1.403292 0.000000
55 0.000000 0.000000 1.403292 0.000000
60 0.000000 0.000000 1.403292 0.000000
65 0.000000 0.000000 1.403292 0.000000
70 0.000000 0.000000 1.403292 0.000000
75 0.000000 0.000000 1.403292 0.000000
80 0.000000 0.000000 1.403292 0.000000
85 1.403292 0.000000 1.403292 1.403292
90 1.403292 0.000000 2.806585 1.403292
95 2.806585 1.403292 2.806585 2.806585

# I then try to combine these 4 individual UD’s using the following code

UDs <- lapply(1:length(hrBB), function(i) hrBB[[i]]$UD)
UDend <- liUD[[1]]
for (i in 2:length(liUD))
UDend <- UDend + liUD[[i]]
nlocs <- unlist(lapply(1:length(tr), function(i) nrow(tr[[i]])))
wi <- nlocs/sum(nlocs)
UDt <- UDs[[1]]
for (i in 2:length(UDs))
UDt <- UDt+wi[i]*UDs[[i]]

# And also tried:

liUD <- lapply(1:length(tr), function(i) {
hrBB[[i]]$UD * (nrow(tr[[i]]) / sum(sapply(tr, nrow)))
})
UDend <- liUD[[1]]
for (i in 2:length(liUD))
UDend <- UDend + liUD[[i]]

But get this error message:

Error in image.default(UDend) : argument must be matrix-like

Any help would be appreciated
Many thanks
Louise Soanes




School of Environmental Sciences
University of Liverpool
Brownlow Hill
L69 3GP

www.puffinisland.org.uk<https://owa.liv.ac.uk/owa/UrlBlockedError.aspx>


	[[alternative HTML version deleted]]

