Hello everyone, I have the following data frame which consists of visual / sightings per hour (SPH) and acoustic / clicks per hour (CPH) data sets for a time span of 8 weeks. I'd like to to have a grouped bar plot which groups the two values for one week together. So e.g. it's 2.676 sightings/h in week 1 and 75.35 clicks/h in week 1. Because of the different units for both variables I also need two y-axes, one for sightings/h on the left and one for clicks/h on the right.
data.frame(Week = c(1, 2, 3, 4, 5, 6, 7, 8), SPH = c(2.676, 2.660, 4.175, 2.134,
3.742, 1.395, 4.739, 2.756), CPH = c(75.35, 29.58, 20.51, 80.43, 97.94, 85.39, 168.61, 142.19))
I tried to create a matrix to plot the data, but I don't know how to tell R properly that the first two variables belong to week 1, the second two to week 2 etc.
Hope you guys can help me with this.
Best regards and thanks in advance. 