I'm an R beginner attempting to do what I figured (erroneously) would be a beginner-type task: produce a simple plot of means/standard deviations for multiple survey questions (vectors), grouped by a second variable (say, group).
So I am reading variables (say, q1-q10) into R from Stata and have even managed to melt
the data following this suggestion.
What I would like is essentially the graph presented in the solution:
However, my data contain missing values (NA
), and the NUMBER of missing values varies by question. So when I try to use ggplot
to plot the 'melted' data, I get an error saying the vector lengths do not match.