I have data in the following format:
# repetition, packet, route, energy level
1, 1, 1, 10.0
1, 1, 2, 12.3
1, 1, 3, 13.8
1, 2, 1, 9.2
1, 2, 2, 10.1
1, 2, 3, 11.2
...
50,99,3, 0.01
Now, I want to create a plot showing box plots per route per packet over all repetitions. So, for example the x-axis would depict the packets and the y-axis the energy level. The first tick on the x-axis would show three box plots which contain data of three subsets
subset(data, data$packet == 1 & data$route == 1)
subset(data, data$packet == 1 & data$route == 2)
subset(data, data$packet == 1 & data$route == 3)
and so on. I'm using ggplot2 and I'm wondering if I have to create each time a boxplot and try to add them into one or if there is a smart way to do this?
Thanks in advance! M.