[R] lattice panel.lmline problem

Deepayan Sarkar deepayan.sarkar at gmail.com
Mon Sep 10 21:58:31 CEST 2007


On 9/10/07, Ross Darnell <r.darnell at uq.edu.au> wrote:
> Thanks Frede
>
> I didn't know about the "r" type.

For the record, this is probably what you wanted:

xyplot(<...>
       panel = panel.superpose,
       panel.groups = function(x, y, ...) {
           panel.xyplot(x, y, ...)
           if (length(x) > 0) panel.lmline(x, y, ...)
       })

x[subscripts] inside the panel function doesn't give anything
meaningful ('x' is already subscripted).

-Deepayan


>
> Ross Darnell
>
>
> -----Original Message-----
> From: Frede Aakmann Tøgersen [mailto:FredeA.Togersen at agrsci.dk]
> Sent: Mon 10-Sep-07 4:45 PM
> To: Ross Darnell; r-help at stat.math.ethz.ch
> Subject: SV: [R] lattice panel.lmline problem
>
> Why not use the more simple
>
> xyplot(total.fat~x|variable,groups=Group,
>        data=tmp1,type=c("p","r"))
>
> ???
>
> See ?panel.xyplot and especially the type argument of that panel function.

[...]



More information about the R-help mailing list