A cleaned movement track can be classified into residence patches using the function atl_res_patch. The function expects a specific organisation of the data: there should be at least the following columns, x, y, time, and id, all named in lower case, and corresponding to the coordinates, timestamp in the UNIX format (seconds since 1970), and the identity of the tracked individual. The result contains only the data that was classified as a residence patch and removes transit between them. atl_res_patch requires only three parameters: (1) the distance threshold between positions (called buffer_size), (2) the distance threshold between clusters of positions (called lim_spat_indep), and (3) the time interval between clusters (called lim_time_indep). Clusters formed of fewer than a minimum number of positions can be excluded. The exclusion of clusters with few positions can help in removing bias due to short stops, but if such short stops are also of interest, they can be included by reducing the min_fixes argument. Position covariates such as speed may also be summarised patch-wise by passing covariate names and summary functions as character vectors to the summary_variables and summary_functions arguments, respectively .

atl_res_patch(
  data,
  buffer_radius = 10,
  lim_spat_indep = 100,
  lim_time_indep = 30,
  min_fixes = 3,
  summary_variables = c(),
  summary_functions = c()
)

Arguments

data

A dataframe of values of any class that is or extends data.frame. The dataframe must contain at least two spatial coordinates, x and y, and a temporal coordinate, time. The names of columns specifying these can be passed as arguments below. The column id indicating animal id is required.

buffer_radius

A numeric value specifying the radius of the buffer to be considered around each coordinate point. May be thought of as the distance that an individual can access, assess, or otherwise cover when at a discrete point in space.

lim_spat_indep

A numeric value of distance in metres of the spatial distance between two patches for them to the considered independent.

lim_time_indep

A numeric value of time in minutes of the time difference between two patches for them to be considered independent.

min_fixes

The minimum number of fixes for a group of spatially-proximate number of ponts to be considered a preliminary residence patch.

summary_variables

Optional variables for which patch-wise summary values are required. To be passed as a character vector.

summary_functions

The functions with which to summarise the summary variables; must return only a single value, such as median, mean etc. To be passed as a character vector.

Value

A data.frame extension object. This dataframe has the added column patch and patchdata, indicating the patch identity and the data used to construct the patch. In addition, there are columns with patch summary variables.

Author

Pratik R. Gupte

Examples

if (FALSE) {
patches <- atl_res_patch(
  data = track_data,
  buffer_radius = 10,
  lim_spat_indep = 100,
  lim_time_indep = 30,
  min_fixes = 3,
  summary_variables = c("speed"),
  summary_functions = c("mean", "sd")
)
}