Generates formatted GT tables summarizing factor frequencies from bootstrap subgroup analysis. Creates two complementary tables: one showing factor selection frequencies within each position (M.1, M.2, etc.), and another showing overall factor frequencies across all positions.
create_factor_summary_tables(factor_freq, n_found, min_percent = 2)A list with up to two GT table objects:
by_positionGT table showing factor frequencies within each position. Percentages represent conditional probability of factor selection given that the position was populated. Within each position, percentages sum to approximately 100% (may not sum exactly to 100% after filtering).
overallGT table showing total factor frequencies across all positions. Includes additional columns indicating which positions each factor appeared in and how many unique positions used the factor. Percentages represent proportion of successful iterations where the factor appeared in any position.
If no factors meet the minimum threshold, the corresponding table element will be NULL.
Data.frame or data.table. Factor frequency table from
summarize_bootstrap_subgroups, containing columns:
Position: Position identifier (e.g., "M.1", "M.2")
Factor: Factor definition string
N: Count of times factor appeared in this position
Percent: Percentage relative to times position was populated
Integer. Number of successful bootstrap iterations (where a subgroup was identified). Used to calculate overall percentages.
Numeric. Minimum percentage threshold for including factors in the tables. Factors with selection frequencies below this threshold are excluded. Default is 2 (i.e., 2%).
summarize_bootstrap_subgroups for generating the factor_freq input
format_subgroup_summary_tables for creating all subgroup summary tables
summarize_bootstrap_results for complete bootstrap analysis workflow
forestsearch_bootstrap_dofuture for running bootstrap analysis