Multiple diagrams per window or device

Using layout()

Four equally sized cells

     [,1] [,2]
[1,]    1    3
[2,]    2    4
plot of chunk rerDiagMultiple01
plot of chunk rerDiagMultiple01
plot of chunk rerDiagMultiple02
plot of chunk rerDiagMultiple02

Four cells of different size

plot of chunk rerDiagMultiple03
plot of chunk rerDiagMultiple03
plot of chunk rerDiagMultiple04
plot of chunk rerDiagMultiple04

Combining and omitting cells

     [,1] [,2]
[1,]    1    1
[2,]    0    2
plot of chunk rerDiagMultiple05
plot of chunk rerDiagMultiple05

Using par(mfrow, mfcol)

plot of chunk rerDiagMultiple06
plot of chunk rerDiagMultiple06

Using par(fig)

plot of chunk rerDiagMultiple07
plot of chunk rerDiagMultiple07

Using split.screen()

[1] 1 2 3
plot of chunk rerDiagMultiple08
plot of chunk rerDiagMultiple08

Get the article source from GitHub

R markdown - markdown - R code - all posts