calc_hwig {hwig} | R Documentation |
Calculates the Half-Weight Association Index according to the method described in Godde et al. (2013).
calc_hwig(hwi)
hwi |
output of calc_hwi. Either a data.table or a list of data.tables. See 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.
HWIG data.table or list of data.tables.
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.
# 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)