I'm new to R and need to draw an error bar. The raw data looks like this:
ID Day pH
1 1 7
1 1 7.2
1 1 7.1
2 1 7.3
2 1 7.4
2 1 7.2
3 1 7
3 1 7.1
3 1 7.5
4 1 7.3
4 1 7.2
4 1 7.6
1 2 7
1 2 7.2
1 2 7.1
2 2 7.1
2 2 7.4
2 2 7.2
3 2 7.5
3 2 7.1
3 2 7.5
4 2 7.2
4 2 7.2
4 2 7.3
1 3 7.4
1 3 7.2
1 3 7.1
2 3 7.2
2 3 7.4
2 3 7.2
3 3 7.4
3 3 7.2
3 3 7.5
4 3 7.4
4 3 7.2
4 3 7.7
I want to create a barplot with error bars showing the mean pH value on the y-axis and the ID on the x-axis with the days in different coloured bars and the standard deviation as error bars.