[R-sig-Geo] small bug in adehabitatHR function BRB

camposfa facampos at ucalgary.ca
Sat Dec 15 08:24:17 CET 2012


The function BRB of the package adehabitatHR implements the biased random
bridge method of home range estimation. It takes the following argument by
default:

type=c("UD","ID", "RD")

This suggests that the function will return three types of distributions
(utilization distribution, intensity distribution, and recursion
distribution). However, only the utilization distribution is returned by
default. From browsing the code, the function does not appear to be designed
to return more than one type of distribution (although this would be very
useful). Thus, the default value of the argument should probably be:

type="UD"

It is not clear to me why this small bug does not produce an error. For
example, an error is produced if you attempt to call the function with
type=c("UD","ID")

#####
# Using the example data set from the package documentation
data(buffalo)
vv <- BRB.D(buffalo$traj, Tmax = 180*60, Lmin = 50,habitat =
buffalo$habitat, activ = "act")
ud <- BRB(buffalo$traj, D = vv, Tmax = 180*60, tau = 300, Lmin = 50,
hmin=100, habitat = buffalo$habitat, activity = "act", grid = 50, b=0,
type=c("UD","ID"), same4all=FALSE, extent=0.5)
#####

Generates the following error:
Error in match.arg(type) : 'arg' must be of length 1



--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/small-bug-in-adehabitatHR-function-BRB-tp7581950.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list