This is my first time using this platform. I hope I am doing this right. I am trying to add a group mean on top of individual data in a standard geom_point() graph from two groups. I got that part covered quite fast (see code below). The data I want to show are from two continuous variables.
The problem is that I would like the group mean to represent not only the mean, but also the standard error of the means (from each of the two variables). I thought a "+" sign with different height and width according to each variable would be a good idea, but I don't find anywhere how to change the Height and the Width (separately) of a single point.
So far, the code resemble this:
DataMean <- Data %>%
group_by(Group) %>%
summarise(x = mean(x),
y= mean(y))
ggplot(Data, aes(x = x, y = y, shape = as.factor(Group))) +
geom_point() +
geom_point(data = DataMean, size = 4, shape = 3)
Shape 3 being the "+" sign in R. However, I do not know how to change the height/width of the vertical/horizontal bar of that "+" sign in order to make it correspond to each groups' standard error of the mean. So far, I obtain the graph below.
Thanks and have a great day. Graph