knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%", eval = FALSE ) options(datatable.print.rownames = FALSE, datatable.print.class = FALSE)
Calculates the half-weight index gregariousness (HWIG) as described in Godde et al. (2013) [1].
devtools::install_gitlab('robit.a/hwig') # CRAN install.packages('hwig')
# Load packages library(hwig) 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) # Set names nms <- get_names(DT, 'yr') names(hwig) <- nms # Print first year's result hwig[1]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.