You can plot two graphs side by side in R using the par()
function to create a layout with multiple plots. Here is an example:
307 chars17 lines
In this example, par(mfrow = c(1, 2))
sets up the layout to have 1 row and 2 columns for the plots, allowing you to plot two graphs side by side. After plotting the graphs, par(mfrow = c(1, 1))
resets the layout back to a single plot.
gistlibby LogSnag