Re: [R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-10 Thread Girish A.R.
Thanks, Felix! That works. best, -Girish -- View this message in context: http://r.789695.n4.nabble.com/lattice-xyplot-Help-needed-in-help-in-customizing-the-panel-abline-function-tp3079656p3081792.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-10 Thread Felix Andrews
Hi Girish, Try this: disc <- xyplot(cnt_gt50pct_disc ~ week_num|sku_num, data=DF,type = "h",lwd=2,panel = function(x, y, ...) { panel.abline(v = x[which.max(y)], lty = 2) panel.xyplot(x, y, ...) }) -Felix On 9 December 2010 17:35, Girish A.R. wrote: > > Hi folks, > >

Re: [R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-08 Thread Girish A.R.
Thanks for the reply, Dieter. I'm sorry I should have made it clear in my original post - the number (output of which.max()) IS dependent on the grouping.. Thanks, -Girish -- View this message in context: http://r.789695.n4.nabble.com/lattice-xyplot-Help-needed-in-help-in-customizing-the-panel

Re: [R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-08 Thread Dieter Menne
Girish A.R. wrote: > > Sorry, just realized that there was a typo in the following code of my > original post. The correct code is as shown below (corrected > 'data=swtop16' to 'data=DF'): > > sales <- xyplot(pct_inv_left ~ week_num|sku_num, data=DF,type = > "l",lwd=2,panel = function(...) { >

Re: [R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-08 Thread Dieter Menne
-- View this message in context: http://r.789695.n4.nabble.com/lattice-xyplot-Help-needed-in-help-in-customizing-the-panel-abline-function-tp3079656p3079697.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

Re: [R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-08 Thread Girish A.R.
Sorry, just realized that there was a typo in the following code of my original post. The correct code is as shown below (corrected 'data=swtop16' to 'data=DF'): sales <- xyplot(pct_inv_left ~ week_num|sku_num, data=DF,type = "l",lwd=2,panel = function(...) { panel.abline(h = 75, lty

[R] [lattice xyplot] Help needed in help in customizing the panel.abline() function

2010-12-08 Thread Girish A.R.
Hi folks, I need some help in customizing the abline() function to be used in a lattice plot. I have attached a reproducible example below. I need help in the following snippet: disc <- xyplot(cnt_gt50pct_disc ~ week_num|sku_num, data=DF,type = "h",lwd=2,panel = function(...) { panel