if (FALSE) {
#1 Utilisation distributions of flatback turtles (n = 15).
data(ud_raster)
#2 Calculate collective areas from 3000 random permutation
area <- boot_area(ud_raster, R = 3000, percent = 50)
#3 Find the minimum sample size required to estimate the general distribution.
a <- asymptote(area, upper.degree = 10, estimator = 'glm', family = gaussian, max.asymptote = NA)
#4 Plot the mean collective area and rational function fit relative to the sample sizes.
ggplot(data = a$results, aes(x = x))+
geom_pointrange(aes(y = y, ymin = y_lwr, ymax = y_upr)) +
geom_point(aes(y = y), size = 2) +
scale_x_continuous(breaks = seq(0, 15, 3), limits = c(2,15), name = "Animals tracked (n)") +
scale_y_continuous(name = expression(Area~(km^2)), labels=function(x) x/1e6)
}
Run the code above in your browser using DataLab