calc_hwig {hwig} | R 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
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)
[Package hwig version 0.0.2 Index]