I am looking for a way to add significance levels into my plots. My df is quite big, so I'll try to explain with an easier example:
data=all_data df1= data[data$column1 == 1,] df2 = data[data$column2 == 1,]
other relevant columns:
- color -> options: black, blue, red
- income -> options: high, mid, low
my code looks like:
ggplot()+ geom_boxplot(data=df1, aes(x=color, y=value_y)+ geom_boxplot(data=df2, aes(x=income, y=value_y)+ geom_signif(comparisons = list(c("black", "blue", map_signif_level=TRUE)
The idea is to compare all possible options, also in between different dataframes e.g. "black" and "high" or "blue" and "low". But even comparing in between the same df does not add p values to the graph.
Anyone any ideas?
also tried stat_comp_means: R console says TRUE but no significance level added to the boxplot