Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

stacked bar plot r with age groups

data$group <- cut(data$Age, breaks = c(30,33,36,39), labels = c("30-33","33-36","36-39"), right = TRUE)
ggplot(data, aes(x = group, fill = Gender)) + 
  geom_bar()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #stacked #bar #plot #age #groups
ADD COMMENT
Topic
Name
4+6 =