Compute Correlation Matrix from Long-format Data
Source:R/compute_correlation_matrix.R
compute_correlation_matrix.Rd
Transforms long-format data to wide format and computes a correlation matrix across iterations.
Arguments
- x
A data frame or data.table with columns `feature`, a user-defined iteration column, and a value column.
- value_col
The name of the column to pivot on (e.g., "p_value" or "T_obs").
- iter_col
The name of the column to treat as "iteration" (e.g., "sample_id", "perm_id").
- method
Correlation method: one of "pearson", "spearman", or "kendall".