I want to make a scatter/dot plot with four different groups of data. My groups are MA-H2o, MA-Cu, OA-H2o, and OA-Cu. I found a previous answer here and made each group into its own separate data set/name which worked great, but the rest of the code they used did not work for me. I am also wondering if I can use a specula symbol in my axis title because I tried but it gave me an error --unexpected symbol--so I'm not sure. Anyways, I would just like to make this figure but I'm not sure how and I am obviously not very skilled at R yet...
I used someone else's code from here and the first half where I made the groups worked but now I have an error. This is what I used.
ggplot(df(aes(x = group, y = Olfactory.epithelium.thickness, color = group))) +
geom_point(size = 4, alpha = 0.7, position = position_jitter(w = 0.1, h = 0)) +
stat_summary(
fun.y = mean, geom = "point", shape = 23,
color = "black", aes(fill = group), size = 4
) +
stat_summary(
fun.ymin = function(x) (mean(x) - sd(x)),
fun.ymax = function(x) (mean(x) + sd(x)),
geom = "errorbar", width = 0.1
) +
theme_bw()
Error in df(aes(x = group, y = Olfactory.epithelium.thickness, color = group)) : argument "df1" is missing, with no default