Let's assume that I have the following dataset:
a b a_lag b_lag
10 30 0 0
12 25 1 0
20 55 2 0
16 37 1 1
24 60 2 1
19 50 2 2
I wish to plot both A an B (different color for each) against the respective axes A_lags and B_lags on the same figure. I found this quite simple with ggplot if we had only one x-axis(lag in the above example), common to both A and B. However, there are different lags which respectively for A(A_lags) and B(B_lags). But the lags are very similar with integers 0,1, and 2. Can anyone show me how to plot A and B against a "common lag" - 0, 1 and 2 on Rstudio?