i am a novice in R. my data looks like below - i want to plot bargraph without using any packages. the graph should have x-axis for QR(1:5) and y-axis with mean. there should five bars expected for each of 1,2,3,4 and 5. the real data has thousands of records - this is sample. any helps greatly appreciated.
date QR mean
1 6/29/2018 1 1.0336214
2 6/29/2018 2 1.0331653
3 6/29/2018 3 1.0323717
4 6/29/2018 4 1.0203561
5 6/29/2018 5 1.0051536
6 5/31/2018 1 1.0161869
7 5/31/2018 2 1.0187350
8 5/31/2018 3 1.0114061
9 5/31/2018 4 1.0192010
10 5/31/2018 5 1.0264293
11 4/30/2018 1 1.0173212
12 4/30/2018 2 1.0057920
13 4/30/2018 3 1.0284010
14 4/30/2018 4 1.0360230
15 4/30/2018 5 1.0195000
16 3/29/2018 1 0.9989350
17 3/29/2018 2 0.9981820
18 3/29/2018 3 0.9992832
19 3/29/2018 4 1.0237889
20 3/29/2018 5 1.0490677
as described in summary section
H <- mean
M <- QR
barplot.default(M,H,
main = "Mean vs QR",
xlab = "QR",
ylab = "Mean",
col = "Blue"
)
expected - five bars(in col QR - 1,2,3,4,5) against the corresponding mean