[R] Putting regression lines on SPLOM

(Ted Harding) Ted.Harding at nessie.mcc.ac.uk
Fri Sep 5 20:57:54 CEST 2003


On 05-Sep-03 Deepayan Sarkar wrote:
> 
> Oops, forgot the attachment.
> 
> On Friday 05 September 2003 12:45 pm, Deepayan Sarkar wrote:
>> The prepanel function returns separate limits for x and y axes. This
>> does not translate to splom, since each limit is used on both the x
>> and y axes.
>> However, it is natural to add a new optional argument, which would be
>> a function that would decide on the limits for each variable in the
>> data frame, to be used as both x and y limits. This feature was
>> missing till now, but I have added something for the next release
>> (source() the attached file to use it), which will allow you to do:
>>
>> splom(log(1+DF),
>>       prepanel.limits = function(x) c(0, 15),
>>       panel = function(x, y, ... ) {
>>           panel.xyplot(x, y, ...)
>>       })

Thanks again, Deepayan -- it works a treat!

I guess it would be OK to insert the contents of your file
"panel.limits.R" into the R code file of the "lattice" package, so that
it is loaded every time?

Best wishes,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 167 1972
Date: 05-Sep-03                                       Time: 19:57:54
------------------------------ XFMail ------------------------------




More information about the R-help mailing list