Suppose I have V1, V2 and V3, V4. V1 and V2 form a time series, and V3 and V4 form a time series. V1 and V3 are the time variables and V2 and V4 are the dependent variables of same units. V1 and V3 are periods that overlap eachother, but they don't start/end at the same points.
First I plotted V1 and V2 with, plot(V1,V2, type="l")
. But how would I plot these 2 pairs of variables on the same axis? I would like to merge V1 and V2 together into a data table and do the same with V3 and V4, calling them D1 and D2 respectively. Then I can maybe use plot(D1,D2..), but I don't know how to merge variables like that.
Update:
V1= c(6,7,8,9,10,11,12,13,14,15,16,17,18)
V2= c(27,53,68,45,75,35,72,35,25,27,27,26,52)
V3= c(2,3,4,5,6)
V4=c(54,23,86,43,26)
plot(V1,V2, type="l")