question on using lattice panel plots
On Thu, Apr 16, 2009 at 1:45 PM, Sundar Dorai-Raj <sdorairaj at gmail.com> wrote:
Sorry, that should be:
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 = function(which.given, which.panel, var.name,
? ? ? ? ? ? ? ? ? ? ? ?strip.levels = FALSE,
? ? ? ? ? ? ? ? ? ? ? ?strip.names = TRUE, ...) {
? ? ? ? strip.default(which.given, which.panel,
? ? ? ? ? ? ? ? ? ? ? var.name = sigmaExpr[which.panel],
? ? ? ? ? ? ? ? ? ? ? strip.levels = FALSE,
? ? ? ? ? ? ? ? ? ? ? strip.names = TRUE, ...)
? ? ? },
? ? ? layout = c(3,1))
Not sure how to do this with strip.custom.
bwplot(Error~Method | sigma, data = z ,
strip = strip.custom(strip.names = TRUE, var.name =
expression(sigma), sep = expression(" = ")))
The formatting wouldn't be as good though.
-Deepayan