Here is my code...I want to change the x and y labels and the legend. Also, does anyone know how to stack the two variables on one another instead of side by side?
install.packages("dplyr")
install.packages("tidyr")
install.packages("ggplot2")
library("dplyr")
library("tidyr")
library("ggplot2")
dat <- data.frame(
Hunter = c(40, 25, 11,9,146,6,6,4,4,53),
Nonhunter = c(819, 510,219,195,1,132,117,89,85,1),
Source = as.factor(c("NC", "LT", "WCS", "WWF", "DU", "TCF", "NRDC","NWF","NAS","RMEF"
))
)
dat_long <- dat %>%
gather("Stat", "Value", -Source)
dat_long
ggplot(dat_long, aes(x = Source, y = Value, fill = Stat)) +
geom_col(position = "dodge")
Here is a picture of my graph: