cyt_anova: ANOVA Analysis on Continuous Variables.

View source: R/cyt_anova.R

cyt_anovaR Documentation

ANOVA Analysis on Continuous Variables.

Description

This function performs an analysis of variance (ANOVA) for each continuous variable against every categorical predictor in the input data. Character columns are automatically converted to factors; all factor columns are used as predictors while numeric columns are used as continuous outcomes. For each valid predictor (i.e., with more than one level and no more than 10 levels), Tukey's Honest Significant Difference (HSD) test is conducted and the adjusted p-values for pairwise comparisons are extracted.

Usage

cyt_anova(data, format_output = FALSE)

Arguments

data

A data frame or matrix containing both categorical and continuous variables. Character columns will be converted to factors and used as predictors, while numeric columns will be used as continuous outcomes.

format_output

Logical. If TRUE, returns the results as a tidy data frame instead of a list. Default is FALSE.

Value

If format_output is FALSE (default), a list of adjusted p-values from Tukey's HSD tests for each combination of continuous outcome and categorical predictor. List elements are named in the format "Outcome_Categorical". If format_output is TRUE, a data frame in a tidy format.

Examples

data("ExampleData1")
cyt_anova(ExampleData1[, c(1:2, 5:6)], format_output = TRUE)


CytoProfile documentation built on April 11, 2025, 6:10 p.m.