knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

1. Introduction

Animal movement plays a crucial role in ecology as a key parameter in spatial distribution, population abundance, and other related processes such as habitat use and disease transmission, among others. Nowadays, movement ecology studies are based on a wide range of sensors, mainly biologging devices, but also satellites and drones. However, camera traps (remotely activated cameras, CT) have been scarcely used for this purpose. Camera trapping has experienced exponential growth during the last two decades. CT are used for a wide range of applications: species inventory, habitat use, abundance estimation, occupancy or species interaction, among others. In trappingmotion R package I developed a set of new functions to integrate movement & behavioural ecology in camera trapping studies. Please, see further details in the paper "Innovations in movement and behavioural ecology from camera traps: day range as model parameter"(https://besjournals.onlinelibrary.wiley.com/doi/abs/10.1111/2041-210X.13609)

2. Getting started with trappingmotion package.

This vignette will guide you throught the main functions included in the package. Briefly, we will identify movement behaviours (states) in a red deer population sampled with camera traps. We will estimate the average movement speed of each behaviour, and finally, we will estimate day range (i.e. average daily distance travelled by the animals). For that, we will analyse the dataset 'RedDeerdata' provided in the package.

First we load the trappingmotion library:

# devtools::install_github("PabloPalencia/trappingmotion") # run this line once for 
# installing/updating the package. Version 2.0.0 is available! 
library(trappingmotion)

The data frame "ReedDeerdata" includes 183 records of a red deer population. Time (first column) and movement speed in m/s (second column) of each animal recorded by the camera traps are included.

data("RedDeerdata")
head(RedDeerdata)

2.1 Identifying movement behaviours (states)

Using the identbhvs function it is possible to identify different movement behaviours (e.g. animals that were foraging VS animals that were moving between habitat patches) applying a k-means clustering. The optimal number of behaviours (clusters) is determined by comparing a set of 30 indices.

Before identifying movement behaviours, it is important to explore the presence of outliers in the speed data. Habitual procedures to identify outliers, such as visualization (boxplot), interquartile range and/or statistical tests (z scores) can be applied. identify_outliers function from rstatix R package could be also useful. If outliers are detected, review the speed estimation procedure in those pictures, and/or consider to discard those speeds before indentifying behaviours.

A more complex behaviour identification procedure including log-normal mixture models to assign the speeds to a group can be applied using identbhvs_mixdist function.

identbhvs(RedDeerdata$Speed)

In this example, three different movement behaviours have been identified in this population.

2.2 Estimating mean movement speed

A sampling bias to fast movements have been described in camera trapping studies (Rowcliffe et al., 2016). Considering that, the mean speed of each behaviour cannot be estimated by arithmetic mean. To solve this bias we use the function meanspeed.

meanspeed(behav_class) # colums= behaviours, rows= c(mean, SE)

From the total of 183 speed estimates in our data, 103 observations were classified in the slowest behaviour (0.07 m/s), 54 in a group with an average speed of 0.70 m/s; and the other 26 observations in the fastest group (average speed 1.27 m/s). As expected, we found high difference in the average speed value of each behaviour:

head(speed_data)

2.3 Estimating activity

To estimate day range it is need to get values about activity and speed of the animals. In the first part of this vignette, we have described the procedure to estimate speed. Now, we will describe how to estimate activity rate. For that, we will use the activity R package available in CRAN.

library(activity)

# Estimating radian time of day
RedDeerdata$T_0_1 <- (as.numeric(strptime(RedDeerdata$Time, format="%H:%M:%S") 
                                 - as.POSIXct(format(Sys.Date())), units="secs")/86400)

# Estimating activity value
activityRES <- 2*pi*RedDeerdata$T_0_1
mod1 <- fitact(activityRES, sample="data") 

# Ploting activity patterns
par(mfrow=c(1,1))
plot(mod1)

# Fitting activity results
act <- mod1@act[1]
act_se <- mod1@act[2]

2.4 Estimating day range

Run the dayrange function to estimate day range

dayrange(act, act_se, speed_data)

The day range of this population is 5.07 km per day

#para incluir imagenes externas (el logo)
#```r
#knitr::include_graphics('images/hex-rmarkdown.png')


PabloPalencia/trappingmotion documentation built on Jan. 27, 2024, 1:44 p.m.