I am getting an overall mean value for my dataset whereas I would like it per repName
Here is a dataset example
repName divergence
L2a 0.013
L2a 0.114
L2a 0.294
L2a 0.338
L2b 0.284
L2b 0.306
MIR 0.282
MIR 0.242
MIR 0.181
MIR3 0.235
MIR3 0.23
MIR3 0.346
MIR3 0.331
MIR3 0.279
MIR3 0.303
MIR3 0.095
Here is the dataset I want
repName divergence
L2a 0.18975
MIR3 0.259857143
L2b 0.295
MIR 0.235
and here is my attempt at the code
library(dplyr)
GroupedTableProportion <- mydiv %>% group_by(repName) %>% summarise(divergence)
but this just gives me
mean(divergence)
0.1887634