3 plots arranged in 2 rows and 2 columns
attach(mtcars)
par(mfrow=c(2,2))
plot(wt,mpg, main="Scatterplot of wt vs. mpg")
plot(wt,disp, main="Scatterplot of wt vs disp")
boxplot(wt, main="Boxplot of wt")
But how do I create a panel with just text and then add it to the fourth position in the grid. Apologies. I see now that like many quesioners I was asking you to read my mind or intuit from my code that I expected the text to be arranged left-justified in a grid of locations in the blank space.
(For some reason this seemed perfectly reasonable to ask but it was deleted, despite no close votes or nomination for duplicates offered. I'll put in what I had cobbled together, as an answer but there might be more elegant solutions. I did look at the titles for nominations of similar questions, but didn't find any that matched this problem.)
plot(1:100, 1:100, axes=FALSE, ylab="", xlab="", type="n")
text( rep(c(1,50), each=10), rep( seq(1, 100, by=10),2), labels=letters[1:20])
I've wondered after the fact whether a fine grained grid was the right way to do it. Perhaps a coarser grid with just the right number of rows and columns and using left justified text would be more table-like. The gridExtra package with baptiste's tableGrob might also be a productive direction.
An alternate text argument to "plot" might be:
txt <- structure(c("am", "carb", "cyl", "disp", "drat", "gear", "hp",
"mpg", "qsec", "vs", "wt", "this"), .Dim = 3:4)
> txt
[,1] [,2] [,3] [,4]
[1,] "am" "disp" "hp" "vs"
[2,] "carb" "drat" "mpg" "wt"
[3,] "cyl" "gear" "qsec" "this"