calc_hwig: Calculate HWIG

View source: R/hwig.R

calc_hwigR Documentation

Calculate HWIG

Description

Calculates the Half-Weight Association Index according to the method described in Godde et al. (2013).

Usage

calc_hwig(hwi)

Arguments

hwi

output of calc_hwi. Either a data.table or a list of data.tables. See Details.

Details

It is expected that the input 'hwi' is the output from 'calc_hwi'. If 'by' was provided in that function, 'hwi' will be a list of data.tables. Alternatively if ‘by' wasn’t provided, 'hwi' will be a single data.table.

Value

HWIG data.table or list of data.tables.

References

Sophie Godde, Lionel Humbert, Steeve D. Côté, Denis Réale, Hal Whitehead. Correcting for the impact of gregariousness in social network analyses. Animal Behaviour. Volume 85, Issue 3. 2013.

See Also

calc_hwi get_names

Examples

# Load data.table
library(data.table)

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

# Calculate HWI
hwi <- calc_hwi(DT, 'id', 'group', 'yr')

# Calculate HWIG
hwig <- calc_hwig(hwi)

robitalec/hwig documentation built on March 5, 2023, 10:24 a.m.