[R] How to write a new "top-level" Trellis/lattice function?

Sundar Dorai-Raj sundar.dorai-raj at pdf.com
Tue Feb 1 17:13:02 CET 2005


I agree with Deepayan regarding writing your own (pre)panel functions to 
override xyplot defaults rather than calling trellis.skeleton. However, 
if this is truly what you need, Dimitris' answer can be improved by 
using the `:::' operator which will extract internal functions such as 
trellis.skeleton.

lattice:::trellis.skeleton

--sundar

Dimitris Rizopoulos wrote:
> you can see the trellis.skeleton function using the following:
> 
> library(lattice)
> getAnywhere(trellis.skeleton)
> f <- getAnywhere(trellis.skeleton)[[2]][[1]]
> 
> I hope it helps.
> 
> Best,
> Dimitris
> 
> ----
> Dimitris Rizopoulos
> Ph.D. Student
> Biostatistical Centre
> School of Public Health
> Catholic University of Leuven
> 
> Address: Kapucijnenvoer 35, Leuven, Belgium
> Tel: +32/16/336899
> Fax: +32/16/337015
> Web: http://www.med.kuleuven.ac.be/biostat
>     http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm
> 
> 
> ----- Original Message ----- From: "Marc Paterno" <paterno at fnal.gov>
> To: <r-help at stat.math.ethz.ch>
> Sent: Tuesday, February 01, 2005 2:53 PM
> Subject: [R] How to write a new "top-level" Trellis/lattice function?
> 
> 
>> Hello,
>>
>> I am trying to write a new "top level" Trellis/lattice function.
>> By "top-level", I mean a function like 'xyplot', 'histogram',
>> 'bwplot', etc.
>> These functions all call 'trellis.skeleton', which I am unable to
>> call;
>> an attempt to invoke the function that does so yields the error
>> message:
>>
>> -----
>> Error in do.call("trellis.skeleton", c(list(cond = cond, aspect =
>> aspect,  :
>>        couldn't find function "trellis.skeleton"
>> -----
>>
>> It seems that 'trellis.skeleton' is an internal (to lattice) function.
>> Is this correct, and if so, what is the recommended way to develop a
>> new
>> top-level Trellis/lattice function?
>>
>> best regards,
>> Marc
>>
>> ----
>> Dr. Marc Paterno
>> Fermi National Accelerator Laboratory
>>
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide! 
>> http://www.R-project.org/posting-guide.html
>>
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html




More information about the R-help mailing list