Learn R Programming

Orangutan (version 2.1.0)

categorical_analyses: Categorical Data Analysis

Description

Performs Chi-squared tests and generates proportional bar plots for categorical variables.

Usage

categorical_analyses(
  data,
  cat_vars,
  output_dir,
  palette_name = "Paired",
  custom_colors = NULL
)

Value

A data frame with Chi-squared test results

Arguments

data

Data frame containing the variables

cat_vars

Character vector of categorical variable names

output_dir

Directory to save results

palette_name

RColorBrewer palette name for categorical fills (default: "Paired")

custom_colors

Optional named vector of colors for species (not used for categorical fills)