Re: [R] Evaluated expression in lattice key

2015-01-22 Thread Naresh Gurbuxani
Chee Hee, This is indeed what I was looking for. Thank you for introducing me to panel.text, Naresh > Date: Mon, 19 Jan 2015 21:17:18 -0600 > From: chl...@mail.usask.ca > Subject: Re: [R] Evaluated expression in lattice key > To: naresh_gurbux...@hotmail.com; r-help@r-project.org

Re: [R] Evaluated expression in lattice key

2015-01-19 Thread Chel Hee Lee
I guess that you may need 'panel.text()' to customize panel function. Please run the following code and see the output. You will see different value of R-squared in each panel. xyplot( y~x|name, data=df, panel = function(x, y, ...) { panel.xyplot(x, y, ...) panel.abline(lm(y~x), co

Re: [R] Evaluated expression in lattice key

2015-01-19 Thread Duncan Mackay
Subject: [R] Evaluated expression in lattice key In a conditional xyplot, I would like to add some numerical results in every panel. Consider below example. df <- data.frame(x = rnorm(100), name = "A") df <- within(df, {y <- x + 0.2 * rnorm(100)}) df2 <- data.frame(x = rno

[R] Evaluated expression in lattice key

2015-01-17 Thread Naresh Gurbuxani
In a conditional xyplot, I would like to add some numerical results in every panel. Consider below example. df <- data.frame(x = rnorm(100), name = "A") df <- within(df, {y <- x + 0.2 * rnorm(100)}) df2 <- data.frame(x = rnorm(100), y = rnorm(100), name = "B") df <- rbind(df, df2) rm(df2) with(