Description Usage Arguments Details Value See Also Examples
Calculates the Half-Weight Association Index
1 |
DT |
input group membership data, in individual/group format |
id |
column indicating id in DT |
group |
column indicating group in DT |
by |
column(s) to split calculation by. e.g.: year |
Expects an input 'DT' with id and group column, e.g. as returned by group_pts.
HWI data.table or list of data.tables.
calc_hwig
1 2 3 4 5 6 7 8 | # 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')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.