if (FALSE) {
# Create sample plot data
plot_data_1 <- data.frame(
.variable_label = rep("Job satisfaction", 3),
.category = factor(c("Low", "Medium", "High"), levels = c("Low", "Medium", "High")),
.category_order = 1:3,
.proportion = c(0.2, 0.3, 0.5)
)
plot_data_2 <- data.frame(
.variable_label = rep("Job satisfaction", 3),
.category = factor(c("Low", "Medium", "High"), levels = c("Low", "Medium", "High")),
.category_order = 1:3,
.proportion = c(0.3, 0.4, 0.3)
)
plots <- list(
list(data = plot_data_1),
list(data = plot_data_2)
)
# Generate text summaries
txt_from_cat_mesos_plots(plots, min_prop_diff = 0.10)
# Compare lowest categories instead
txt_from_cat_mesos_plots(
plots,
flip_to_lowest_categories = TRUE,
min_prop_diff = 0.05
)
}
Run the code above in your browser using DataLab