Thank you very much Johanna! Regarding your question: You may also calculate the SD using the aggregate function. Then, you may adjust the labels argument when creating the plot accordingly.
Thanks! Do you perhaps know how to show the different means for each boxplot, in the case you add a third binomial variable on the graph (aes= x, y, fill=z)? In this case, the means stay in the middle of both boxplots and are not placed on their own boxplots...
Hey Russtin, without the ..y.. ggplot2 doesn't know that the y corresponds to the input data in the ggplot() function. If you remove the dots, the following error message is returned: "Error in paste("Mean:", round(y, digits = 1)) : object 'y' not found". Regards, Joachim
thanks! was very usefull with my college stuff!!
Thanks Inay! Glad it helped!
Took me out of my 2 hours serch! short and just what I needed! Master!
That's great to hear, glad it helped!
Good continuation
Thanks Azzeddine, glad you think so! :)
Super clear and useful! How would you do to add Mean+SD as label? Is there a way to add the number of observations for each group? Thanks
Thank you very much Johanna! Regarding your question: You may also calculate the SD using the aggregate function. Then, you may adjust the labels argument when creating the plot accordingly.
Thanks! Do you perhaps know how to show the different means for each boxplot, in the case you add a third binomial variable on the graph (aes= x, y, fill=z)? In this case, the means stay in the middle of both boxplots and are not placed on their own boxplots...
Hey, are you looking for this?
data
What does the ..y.. accomplish in the round function?
Hey Russtin, without the ..y.. ggplot2 doesn't know that the y corresponds to the input data in the ggplot() function. If you remove the dots, the following error message is returned: "Error in paste("Mean:", round(y, digits = 1)) : object 'y' not found". Regards, Joachim