[R] Adding points to a wireframe with conditioning variable
deepayan.sarkar at gmail.com
Thu Jul 5 20:24:37 CEST 2007
On 7/5/07, Mark Lyman <mark.lyman at gmail.com> wrote:
> I would like to add points to a wireframe but with a conditioning variable. I
> found a solution for this without a conditioning variable here,
> http://finzi.psych.upenn.edu/R/Rhelp02a/archive/65321.html. Does anyone know
> how to plot a wireframe conditioned on a variable and add the points
> conditioned on the same variable, similar to the solution at the link above?
Depends on what form you have your points in. Inside a panel function,
packet.number() will give you the packet number in sequential order
(column major order if you think of the conditioning variables as
defining a multiway cross-tabulation), and which.packet() will give
you a vector with the current level of each conditioning variable. You
can use these to extract the appropriate subset of points.
More information about the R-help