Skip to content
Prev 177322 / 398506 Next

question on using lattice panel plots

Try:

z <- cbind(rep(c("BIC", "hist"), each = 150), rep(rep(c(5, 10, 30),
each = 50),2))

z <- as.data.frame(z)

z <- cbind(z, runif(300))
names(z) <- c("Method", "sigma", "Error")
z$sigma <- factor(z$sigma, c("5", "10", "30"))
library(lattice)

sigma <- as.numeric(levels(z$sigma))
sigmaExprList <- lapply(sigma, function(s) bquote(sigma == .(s)))
sigmaExpr <- as.expression(sigmaExprList)
bwplot(Error~Method | sigma, data = z,
       horiz = F, xlab = "Method",
       strip = strip.custom(var.name = sigmaExpr,
         strip.levels = FALSE, strip.names = TRUE),
       layout = c(3,1))

HTH,

--sundar
On Thu, Apr 16, 2009 at 12:43 PM, Ranjan Maitra <maitra at iastate.edu> wrote: