I am trying to make a bar graph with a data set and I made the three variables into values, but I need to make 2 of the values in to one variable education and no education to put on one access, but I do not know how to do that. The education variables are formated as no (0) and yes(1)
library(ggplot2)
# simulated data ed for education and yrs for years employed
# just to illustrate
set.seed(42)
d <- data.frame(
edu = as.factor(sample(c("0","1"),100,replace = TRUE)),
yrs = sample(5:20,100,replace = TRUE))
d |> ggplot(aes(edu,)) +
geom_bar()
Created on 2023-11-28 with reprex v2.0.2
This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.