I want to convert the following data enter image description here
to this format
I have managed to do the following code but can't seem to figure out the SD part:
data_long <- data %>% pivot_longer(cols = mean_control:mean_infected,
names_to = "mean",
values_to = "count"
)