I want to make a boxplot in r but I struggle with grouping the boxplot by a third variable.
I want to have boxplots- all on one y-axes (score on a treatment outcome questionnaire), called HAMD)) -
for weeks 0-5 (called week)
and all twice for two treatment groups (called Treatment).
I made two boxplots with
boxplot(MP$HAMD ~ MP$week)
and six with
boxplot(MP$HAMD ~ MP$Treatment)
But now I want 12 boxplots together, each per week per treatment. How can I do this in r?
By all means thank you very much.
reproduce(<your data>). Instructions are here: bit.ly/SORepro