Package 'SocCaribou'

Title: Package Accompanying: Space-use and social organization in a gregarious ungulate: testing the conspecific attraction and resource dispersion hypotheses
Description: Package Accompanying: Space-use and social organization in a gregarious ungulate: testing the conspecific attraction and resource dispersion hypotheses
Authors: Mélissa Peignier [aut], Quinn M.R. Webber [aut] , Erin Koen [aut], Michel P. Laforge [aut], Alec L. Robitaille [aut, cre] , Eric Vander Wal [aut]
Maintainer: Alec L. Robitaille <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2024-11-21 05:36:04 UTC
Source: https://github.com/wildlifeevoeco/SocCaribou

Help Index


check col

Description

check col

Usage

check_col(DT = NULL, col = NULL, arg = NULL, extra = NULL)

Arguments

DT

data.table

col

column name

arg

argument name

extra

extras


Dynamic network

Description

Dynamic network

Usage

dynamic_network(DT = NULL, id = NULL, by = NULL)

Arguments

DT

'data.table“ of relocations.

id

individual identifier column name.

by

columns in input DT to split home range network generation and comparison by. For example: c('season', 'year') or 'herd'. Expects character vector.

Value

Graph strength for each individual.


Homerange Networks

Description

Build home range networks using adehabitatHR::kerneloverlap and returns either graph statitics or home range overlap.

Usage

hr_network(DT = NULL, id = NULL, utm = NULL, by = NULL,
  returns = NULL)

Arguments

DT

'data.table“ of relocations.

id

individual identifier column name.

utm

proj4string indicating coordinate system of coordinates

by

columns in input DT to split home range network generation and comparison by. For example: c('season', 'year') or 'herd'. Expects character vector.

returns

either 'network-stats' or 'overlap'. See Details.

Details

DT provided with columns EASTING, NORTHING for UTM coordinates. by argument used to specify grouping. Defaults only (as used in the paper).

Value

graph strength for each individual


Step Length

Description

Calculate basic step length with data.table

Usage

step_length(DT, coords = c("EASTING", "NORTHING"), time = "datetime",
  splitBy = c("id", "yr"), moverate = FALSE, type = "lag",
  preserve = FALSE)

Arguments

DT

data.table

coords

character vector, length 2, coordinate column names. UTM required.

time

character time column name.

splitBy

character vector of column names to split step length calculation by. default is id and yr (individual identifier and year as numeric).

moverate

calculate movement rate? stepLength / dif time, unit hours.

type

default: lag. alternative: lead.

preserve

preserve intermediate cols? default: no.

Examples

# Load data.table
library(data.table)

# Read example data
DT <- fread(system.file("extdata", "DT.csv", package = "toast"))

DT[, datetime := as.POSIXct(datetime)]

DT[, yr := year(datetime)]

step_length(DT, coords = c('X', 'Y'), splitBy = c('ID', 'yr'))