Re: [R] how to apply a panel function to each of several data series plotted on the same graph in lattice

2010-06-18 Thread David Wyllie
nction(x, y, ..., lty) { panel.xyplot(x, y, ..., lty = lty) panel.smooth.spline( ...) } ) # then we generate an error 'error using packet 1', and I'm not sure why. Thanks David David Wyllie, PhD University Research Lecturer The Jenner Institute O

[R] ow to apply a panel function to each of several data series plotted on the same graph in lattice

2010-06-18 Thread David Wyllie
Hi is it possible to fit a trend line (or some other panel function) through each of multiple data series plotted on the same graph? Specifically, while one can do something like xyplot(a+b+c~x) which plots three series, a,b & c, but can one automatically fit lines through each of them? I s

[R] Length as fun.aggregate in cast function of reshape package: unexpected error

2010-03-12 Thread David Wyllie
very simple, and appears almost identical to that used in the ChickWeight example in the package. The problem can be reproduced and is described in more detail below, along with the rationale for what we're trying to do. Any help would be very gratefully received. Best wishes David Wyllie (c