s-news
[Top] [All Lists]

Re: trellis: passing on formula and data to panel

To: Klaas Prins <kprins@Pharsight.com>
Subject: Re: trellis: passing on formula and data to panel
From: Sundar Dorai-Raj <sundar.dorai-raj@pdf.com>
Date: Thu, 28 Sep 2006 09:38:51 -0500
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <5B833E900330354F9FDA984D06F92428AF22D7@ca-exchange.corp.pharsight.com>
Organization: PDF Solutions, Inc.
References: <5B833E900330354F9FDA984D06F92428AF22D7@ca-exchange.corp.pharsight.com>
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)

Klaas Prins said the following on 9/28/2006 4:58 AM:
Can someone inform me the ways to pass on the formula and the data set to the panel function? I want to do operations on the data base using the formula provided to the Trellis call and these things I can't do using the common functionality of Trellis plot functions.

cheers,
Klaas Prins
(S+6.1 WinXP)


I'm not sure why you would want to, but you can pass in the formula as an argument to the panel function:

my.panel <- function(x, y, subscripts, f, z, ...) {
###
}

xyplot(my.formula, my.data, panel = my.panel,
       f = my.formula, z = my.data)

HTH,

--sundar

<Prev in Thread] Current Thread [Next in Thread>