Marc Paterno
2005-Feb-01 13:53 UTC
[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
Dimitris Rizopoulos
2005-Feb-01 14:44 UTC
[R] How to write a new "top-level" Trellis/lattice function?
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 >
Deepayan Sarkar
2005-Feb-01 15:40 UTC
[R] How to write a new "top-level" Trellis/lattice function?
On Tuesday 01 February 2005 07:53, Marc Paterno wrote:> 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?What do you need to do that cannot be done by writing special panel and prepanel functions? See for example, the definition of dotplot, or xYplot in package Hmisc. The only reason to have a new top-level function I can think of is if you need a fundametally different form of the formula. If that's the case, can you give us more details? Deepayan