Re: [R] question on using lattice panel plots

2009-04-16 Thread Deepayan Sarkar
On Thu, Apr 16, 2009 at 1:45 PM, Sundar Dorai-Raj 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, xla

Re: [R] question on using lattice panel plots

2009-04-16 Thread Sundar Dorai-Raj
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.na

Re: [R] question on using lattice panel plots

2009-04-16 Thread Sundar Dorai-Raj
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 <-

[R] question on using lattice panel plots

2009-04-16 Thread Ranjan Maitra
Hi, I think this question is best explained using the following self-contained toy example: ## cut code here and paste to R window 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", "sig

[R] question on using lattice panel plots

2009-04-16 Thread Ranjan Maitra
Hi, I think this question is best explained using the following self-contained toy example: ## cut code here and paste to R window 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", "si