Using ggplot2 geom_bar is there a way to subset two factors on the x axis and group pairs within them?
My dataset contains levels of glottals used in speech of children and their caregivers. Factors are Speaker (a, amum, b, bmum ...), Category (child, caregiver) and Pair (a and amum ...).
My plot shows 22 speakers' levels of glottalisation using the following code:
I would suggest that you try a plot with geom_point() rather than with bars. I think you want to show the relationship between to continuous quantities and a plot with points does that well. You will have to rearrange your data to have a column for the child and one for the caregiver but that can be done without too much trouble.
So you want to pair the data by child so that Adam and Adam mum form one pair and so on? I would try having one column designating the child and another showing whether the given point relates to the child or the caregiver. You could then fill the columns based on this second column. If you post some of your data, someone could give more specific advice. You can post the output of