[R] rgl, multiple graphics ??

Ben Bolker bbolker at gmail.com
Wed Nov 17 17:32:25 CET 2010

skan <juanpide <at> gmail.com> writes:

> How can I get multipanel conditioning graphics with rgl as I do with lattice 
> "|"
> For example I have three variables x, y, z, w.  Where x,y,z are continuous
> and w is categorical or discrete.
> I want to use plot3d(x,y,z) for each value of w in a panel
> something like  plot3d(z~x*y|w)

  You don't.  Sorry.
  You might be able to use split(), lapply() ... to concoct your
own solution (presumably you would open a separate rgl window
for each 'facet').

 suppose d is a data frame with elements x, y, z, w.
 something like:

  dsplit <- split(d,d$w)
    function(delement) {

might work.

More information about the R-help mailing list