Returns the Cramer's V estimate and the P-value from the Pearson chi-square score between two variables.

association_statistic_for_factors(
  factors,
  clean_metadata,
  na_action = "remove"
)

Arguments

factors

A vector of factor variables.

clean_metadata

A data frame with sample identifiers as rownames and variables as factors or numeric as determined by "sageseqr::clean_covariates()".

na_action

Defaults to removing rows with missing values.