IRTFM is correct, but if the different graphs in the layout have different scaling, then you may have to reset the scale after changing the target frame for new graphical elements added to the previous frame to be scaled correctly.
Modifying IRTFM's example a bit to demonstrate, note that this code does not produce the expected result of a horizontal line in the first graph at a value of 5 due to inconsistent scaling.
layout(matrix(1:4,2,2))
plot(1:10, 1:10)
plot(12:1, 1:12)
par(mfg=c(1,1))
abline(h=5)
However, the following code produces the expected result of a horizontal line in the first graph at a value of 5 due to resetting the appropriate scale before adding the abline element.
layout(matrix(1:4,2,2))
plot(1:10, 1:10)
plot(12:1, 1:12)
par(mfg=c(1,1))
plot.window(xlim = c(1, 10), ylim = c(1, 10))
abline(h=5)
Changing to an arbitrary frame in a layout is possible with the "mfg" graphics parameter, but you will need to reset the window scaling for any added elements to appear on the same scale as previously established. Same goes for use of mfrow or mfcol graphics parameters to create multipanel graphs.