I have 3 different dataset (from a longitudinal study), v1, v2 and v3. Each of them has a variable of "gender".
I'd like to plot the count of each gender from each dataset in same graph (indicated by point and connected by line), i.e. x axis will be "v1", "v2" and "v3", y axis will be the count by gender.
I know I can manually create a dataset including the values I need, but I'm wondering if there is a better way? Thank you!
The sample datasets:
a <- c("boy", "girl")
v1 <- data.frame(gender=rep(a, times=c(11,9)))
v2 <- data.frame(gender=rep(a, times=c(8,8)))
v3 <- data.frame(gender=rep(a, times=c(6,4)))
genderto the mre data ;)