
Calculate Ground Diversity (Entropy) Curves and Peaks
Source:R/ena.ground.diversity.R
ena.ground.diversity.RdEvaluates the diversity of "ground types" (combinations of active codes) across a series of sliding window sizes. It returns both the curves and the peak window values.
Arguments
- data
A data.frame or data.table containing the conversation data.
- codeNames
A character vector of column names representing the binary codes.
- conversation_cols
A character vector of column names that define unique conversations.
- max_window
An integer specifying the maximum window size to evaluate. Default is 20.
Value
A list containing three elements:
- curves
A data.table containing aggregated entropy curves across windows.
- peaks
A data.table highlighting the window size(s) where entropy peaked.
- conversation_curves
A data.table showing calculated entropy per individual conversation per window.
Examples
if (FALSE) { # \dontrun{
gd_results <- ena.ground.diversity(data = my_data,
codeNames = c("CodeA", "CodeB"),
conversation_cols = "ConversationID")
} # }