Skip to content
Back to formatted view

Raw Message

Message-ID: <eb555e660904161616t185d08d0xabdfb2d1f30555e6@mail.gmail.com>
Date: 2009-04-16T23:16:37Z
From: Deepayan Sarkar
Subject: question on using lattice panel plots
In-Reply-To: <c9ce82b00904161345s615c4435l51d8fe9aa2b782f7@mail.gmail.com>

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