Learn R Programming

hwig (version 0.0.2)

calc_hwig: 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.

Value

HWIG data.table or list of data.tables.

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.

References

Sophie Godde, Lionel Humbert, Steeve D. C<U+00F4>t<U+00E9>, Denis R<U+00E9>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

Run this code
# NOT RUN {
# 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)
# }

Run the code above in your browser using DataLab