I'm calculating some stats for 3 groups - all, male, and female. I've stored them in a data frame called stats_df that has each group as a column header with the stats as the row data. I need to do a boxplot
(my most current attempt is included in the code) that has all 3 groups represented as boxes, but I can't seem to figure it out and no online tutorials are helping. Data:
Code:
all_stats <- c(all_mean, all_median, all_mode, all_25, all_50, all_75)
female_stats <- c(female_mean, female_median, female_mode, female_25, female_50, female_75)
male_stats <- c(male_mean, male_median, male_mode, male_25, male_50, male_75)
stats_df <- data.frame(all_stats, female_stats, male_stats)
boxplot(all_stats ~ male_stats,
data=stats_df,
main="Stats Boxplot",
xlab="Group",
ylab="Number")