View source: R/Visualizations_SDA.R
analyze_component_scores | R Documentation |
This function performs statistical comparisons between groups for a given component in the scores matrix, using parametric (ANOVA/t-test) or non-parametric (Kruskal-Wallis/Wilcoxon) tests.
analyze_component_scores(
scores_matrix,
meta_df,
component,
meta_feature,
verbose = TRUE
)
scores_matrix |
A numeric matrix where rows are samples and columns are components. |
meta_df |
A data frame with rownames matching 'scores_matrix', containing metadata. |
component |
Character. The component column (e.g., '"Component_1"') to analyze. |
meta_feature |
Character. The metadata column to group by (e.g., '"seqrun"'). |
verbose |
Logical. Whether to print test results (default: TRUE). |
A list containing:
summary_stats |
A summary table with mean, median, variance per group. |
test_result |
Results of ANOVA/Kruskal-Wallis or t-test/Wilcoxon. |
## Not run:
analyze_component_scores(scores_matrix = results$scores,
meta_df = MetaDF,
component = "Component_1",
meta_feature = "seqrun")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.