I know how to combine plots created by R graphics. Just do something like
attach(mtcars)
par(mfrow = c(3,1))
hist(wt)
hist(mpg)
hist(disp)
However, now I have plots by three different graphic systems
# 1
attach(mtcars)
boxplot(mpg~cyl,
xlab = "Number of Cylinders",
ylab = "Miles per Gallon")
detach(mtcars)
# 2
library(lattice)
attach(mtcars)
bwplot(~mpg | cyl,
xlab = "Number of Cylinders",
ylab = "Miles per Gallon")
detach(mtcars)
# 3
library(ggplot2)
mtcars$cyl <- as.factor(mtcars$cyl)
qplot(cyl, mpg, data = mtcars, geom = ("boxplot"),
xlab = "Number of Cylinders",
ylab = "Miles per Gallon")
The par
method doesn't work anymore. How can I combine them?