Target Graph

Target Graph

Target Graph

We wanted to reproduce the barplot of hair color sampled from JMEN within this R Markdown.

Data Entry

jmen <- read.table("jmen.txt", header=TRUE)

Imitation Graph

#barplot of hair color
hair_table <- table(jmen$Hair)
barplot(hair_table, col=c("Black", "khaki1", "orange4", "tomato"), main = "Hair Color of Sampled JMEN", xlab= "Hair Colors", ylab = "Number of Men", names.arg=c("Black", "Blond(e)", "Brown", "Red"))

I was able to imitate the graph fairly well. The only thing that might not be exactly the same is the color orange4 which is the color of the bar for brown hair.