Is there a particular string? I don't know how to add the significative comparison - "*" - on the histogram: is there a package that I need to complete my analysis? Thanks!
GREAT!!! It's the right solution! I want calculate the significance of a difference between groups and add the annotation to the plot in a single line.
But... I don't understand how can I report the script in my analysis?
In my hospital dataset, I have a column "PATIENT SEX" and another column "AGE": I want realize two plot and add the significance of a difference between groups in a single line on the plots.
Error in f(...) :
Can only handle data with groups that are plotted on the x-axis
Inoltre: Warning message:
Continuous x aesthetic -- did you forget aes(group=...)?
I don't understand the error: How can I write my script?
A reproducible example would help - you'd likely discover that if your PATIENT SEX column is numeric then your standalone boxplot doesn't have groups (especially not two labelled "0" and "1"). Converting the SEX variable to factor is the first step towards getting this right. Here's a reprex which shows it working. Hope that helps.