convert_EGA_list_to_df: Convert EGA List to Data Frame

View source: R/convert_EGA_list_to_df.R

convert_EGA_list_to_dfR Documentation

Convert EGA List to Data Frame

Description

Converts a list of EGA results into a combined data frame.

Usage

convert_EGA_list_to_df(ega_list)

Arguments

ega_list

Named list of EGA result objects whose names follow the pattern "<correlation>.<algorithm>", such as the output of run_EGA_combinations.

Value

A data frame with one row per EGA result: the combination name, the correlation method and algorithm parsed from it, and the metrics returned by convert_EGA_to_df.

Examples

set.seed(123)
n <- 300
f1 <- rnorm(n)
f2 <- 0.3 * f1 + rnorm(n)
items <- data.frame(
  sapply(1:4, function(i) 0.7 * f1 + rnorm(n, 0, 0.7)),
  sapply(1:4, function(i) 0.7 * f2 + rnorm(n, 0, 0.7))
)
names(items) <- c(paste0("A", 1:4), paste0("B", 1:4))

combos <- run_EGA_combinations(items, corr = c("pearson", "spearman"),
                               algorithm = c("louvain", "walktrap"))
convert_EGA_list_to_df(combos)

InterconectaR documentation built on Oct. 16, 2026, 1:06 a.m.